osCommerce. 如何把一个网站进入目录模式
February 13, 2015
本教程展示了如何将osCommerce站点放入 catalog mode.
osCommerce. 如何把一个网站进入目录模式Removing Add to cart button
-
默认情况下,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:
-
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:
-
我们可以看到搜索结果. Skip files with .css and .js extensions. 您应该在 .php files. 基本上,大多数更改应该在文件中执行 includes\modules folder, includes\modules\boxes and inside catalog folder (root folder of oscommerce):
-
我们将向您展示应该如何执行更改. Open 包括\ \ new_products模块.php 通过单击适当的代码行. 我们可以看到添加到购物车按钮的类(class="ui-button-text"). 在我们的例子中,添加到购物车按钮的代码结构如下:
$p_buy_now_text = '' .tep_draw_button_top() . '' . tep_draw_button_bottom().'';
删除此代码,保存更改并将修改后的代码上传到服务器. Screenshot 显示应该删除的代码:
按钮从新产品中删除 module:
-
让我们从产品页面中删除按钮. In order to do so, file product_info.php should be modified. 删除代码,保存更改并上传修改后的文件:
我们已经从产品页面删除了添加到购物车按钮:
-
我们将从分类页面中删除添加到购物车按钮. Open \ \模块包括\ product_listing.php file. 删除适当的代码(在本例中,指定了几个添加到购物车按钮的实例):
我们已经从分类页面删除添加到购物车按钮:
-
对于像新产品这样的页面,应该在类似的文件中执行特殊更改 products_new.php, specials.php. 你可以在 root folder of Oscommerce. 适当代码的位置取决于模板和模板模块. 您可以以同样的方式对其余文件执行更改. 请查看教程的视频版本. 在这里,您将看到有关如何将osCommerce站点放入 catalog mode.
Removing prices
-
Inspect price using browser built-in inspector or using Firebug plugin in Firefox browser:
-
您应该对删除了“添加到购物车”按钮的文件执行更改. Please check Removing Add to cart button section above. 按类搜索代码,在我们的例子中,类是productSpecialPrice. Please check code of 包括\ \ new_products模块.php file. 应该删除高亮显示的代码. 请注意,模板中的代码可能有另一个结构:
-
Remove appropriate code in \ \模块包括\盒\ bm_specials.php file:
-
Remove code in product_info.php file:
-
Remove code in 包括\ \ product_listing模块.php file:
-
Remove code in products_new.php file:
-
Remove code in specials.php file:
-
您可以以同样的方式对其余文件执行更改. 请查看教程的视频版本. 在这里,您将看到有关如何将osCommerce站点放入 catalog mode.
-
We have removed prices:
Removing Shopping cart
-
Now we should remove Shopping cart. In our template shopping cart is provided by Shopping Cart in Header module:
-
打开admin部分并转到 Modules->Boxes. Click on the module:
-
Remove the module:
-
We have removed shopping cart module:
请随时查看下面的详细视频教程:
osCommerce. 如何把一个网站进入目录模式