Categories

osCommerce. 如何把一个网站进入目录模式

Ryan DeWitt February 13, 2015
Rating: 3.7/5. From 3 votes.
Please wait...

本教程展示了如何将osCommerce站点放入 catalog mode.

osCommerce. 如何把一个网站进入目录模式

Removing Add to cart button

  1. 默认情况下,osCommerce没有 catalog mode. 这就是为什么你应该编辑文件,以便把网站 catalog mode. 基本上,你应该删除所有的添加到购物车按钮,以摆脱 shopping cart functionality. 检查添加到购物车按钮是否使用 browser built-in inspector or using Firebug plugin in Firefox browser. 我们可以看到添加到购物车按钮有 ui-button-text 类(请注意类名取决于模板). 我们将使用这个类,以便在osCommerce文件中找到适当的代码. Click Find All:

    osCommerce. 如何将网站放入目录模式-1
  2. Open editor 它可以搜索多个文件和文件夹中的代码. We are going to use Notepad++ editor. Press Ctrl+F 为了打开搜索对话框,打开 Find in Files tab. Specify the class name in Find what field. 选择包含osCommerce文件的文件夹 Directory 节(确保模板文件是统一的). 确保你有相同的选项 screenshot below. Click Find All:

    osCommerce. 如何把一个网站进入目录模式2
  3. 我们可以看到搜索结果. Skip files with .css and .js extensions. 您应该在 .php files. 基本上,大多数更改应该在文件中执行 includes\modules folder, includes\modules\boxes and inside catalog folder (root folder of oscommerce):

    osCommerce. 如何把一个网站进入目录模式3
  4. 我们将向您展示应该如何执行更改. Open 包括\ \ new_products模块.php 通过单击适当的代码行. 我们可以看到添加到购物车按钮的类(class="ui-button-text"). 在我们的例子中,添加到购物车按钮的代码结构如下:

     $p_buy_now_text = '' .tep_draw_button_top() . ''.  IMAGE_BUTTON_IN_CART .'' . tep_draw_button_bottom().'';

    删除此代码,保存更改并将修改后的代码上传到服务器. Screenshot 显示应该删除的代码:

    osCommerce. 如何把一个网站进入目录模式4

    按钮从新产品中删除 module:

    osCommerce. 如何把一个网站进入目录模式5
  5. 让我们从产品页面中删除按钮. In order to do so, file product_info.php should be modified. 删除代码,保存更改并上传修改后的文件:

    osCommerce. 如何把一个网站进入目录模式6

    我们已经从产品页面删除了添加到购物车按钮:

    osCommerce. 如何把一个网站进入目录模式7
  6. 我们将从分类页面中删除添加到购物车按钮. Open \ \模块包括\ product_listing.php file. 删除适当的代码(在本例中,指定了几个添加到购物车按钮的实例):

    osCommerce. 如何将网站放入目录模式-8

    我们已经从分类页面删除添加到购物车按钮:

    osCommerce. 如何把一个网站进入目录模式
  7. 对于像新产品这样的页面,应该在类似的文件中执行特殊更改 products_new.php, specials.php. 你可以在 root folder of Oscommerce. 适当代码的位置取决于模板和模板模块. 您可以以同样的方式对其余文件执行更改. 请查看教程的视频版本. 在这里,您将看到有关如何将osCommerce站点放入 catalog mode.

Removing prices

  1. Inspect price using browser built-in inspector or using Firebug plugin in Firefox browser:

    osCommerce. 如何将网站放入目录模式-10
  2. 您应该对删除了“添加到购物车”按钮的文件执行更改. Please check Removing Add to cart button section above. 按类搜索代码,在我们的例子中,类是productSpecialPrice. Please check code of 包括\ \ new_products模块.php file. 应该删除高亮显示的代码. 请注意,模板中的代码可能有另一个结构:

    osCommerce. 如何将网站放入目录模式-11
  3. Remove appropriate code in \ \模块包括\盒\ bm_specials.php file:

    osCommerce. 如何将网站放入目录模式-12
  4. Remove code in product_info.php file:

    osCommerce. 如何将网站放入目录模式-13
  5. Remove code in 包括\ \ product_listing模块.php file:

    osCommerce. 如何将网站放入目录模式-14
  6. Remove code in products_new.php file:

    osCommerce. 如何将网站放入目录模式-15
  7. Remove code in specials.php file:

    osCommerce. 如何将网站放入目录模式-16
  8. 您可以以同样的方式对其余文件执行更改. 请查看教程的视频版本. 在这里,您将看到有关如何将osCommerce站点放入 catalog mode.

  9. We have removed prices:

    osCommerce. 如何将网站放入目录模式-17

Removing Shopping cart

  1. Now we should remove Shopping cart. In our template shopping cart is provided by Shopping Cart in Header module:

    osCommerce. 如何将网站放入目录模式-17
  2. 打开admin部分并转到 Modules->Boxes. Click on the module:

    osCommerce. 如何将网站放入目录模式-19
  3. Remove the module:

    osCommerce. 如何将网站放入目录模式-20
  4. We have removed shopping cart module:

    osCommerce. 如何将网站放入目录模式-21

请随时查看下面的详细视频教程:

osCommerce. 如何把一个网站进入目录模式
This entry was posted in OsCommerce Tutorials and tagged catalog, mode, osCommerce. Bookmark the permalink.

Submit a ticket

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: Submit a ticket