Categories

osCommerce. How to put a site into catalog mode

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

This tutorial shows how to put osCommerce site into catalog mode.

osCommerce. How to put a site into catalog mode

Removing Add to cart button

  1. By default, osCommerce does not have catalog mode. That’s why you should edit files in order to put web site into catalog mode. Basically, you should remove all Add to cart buttons in order to get rid of shopping cart functionality. Inspect add to cart button using browser built-in inspector or using Firebug plugin in Firefox browser. We can see that Add to cart button has ui-button-text class (please note that the class name depends on the template). We will use this class in order locate the appropriate code in osCommerce files. Click Find All:

    osCommerce. How to put a site into catalog mode-1
  2. Open editor that can search code in multiple files and folders. We are going to use Notepad++ editor. Press Ctrl+F in order to open search dialog, open Find in Files tab. Specify the class name in Find what field. Select folder with osCommerce files in Directory section (make sure that template files are unizipped). Make sure that you have the same options as on the screenshot below. Click Find All:

    osCommerce. How to put a site into catalog mode-2
  3. We can see the search results. Skip files with .css and .js extensions. You should perform changes in .php files. Basically, most changes should be performed to files in includes\modules folder, includes\modules\boxes and inside catalog folder (root folder of oscommerce):

    osCommerce. How to put a site into catalog mode-3
  4. We are going to show you the way how changes should be performed. Open includes\modules\new_products.php file by clicking on appropriate line of code. We can see class of Add to cart button (class="ui-button-text"). In our case Add to cart button has the following structure of code:

     $p_buy_now_text = '' .tep_draw_button_top() . '<a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'" class=""></i><span class="ui-button-text">'.  IMAGE_BUTTON_IN_CART .'</span></a>' . tep_draw_button_bottom().'';

    Remove this code, save changes and upload the modified code to server. Screenshot shows what code should be removed:

    osCommerce. How to put a site into catalog mode-4

    Button was removed from New products module:

    osCommerce. How to put a site into catalog mode-5
  5. Let’s remove the button from product page. In order to do so, file product_info.php should be modified. Remove code, save changes and upload the modified file:

    osCommerce. How to put a site into catalog mode-6

    We have removed Add to cart button from product page:

    osCommerce. How to put a site into catalog mode-7
  6. We are going to remove Add to cart button from category page. Open \includes\modules\product_listing.php file. Remove the appropriate code (in our case several instances of add to cart button were specified):

    osCommerce. How to put a site into catalog mode-8

    We have removed Add to cart button from category page:

    osCommerce. How to put a site into catalog mode-9
  7. For pages like new products, specials changes should be performed in files like products_new.php, specials.php. You can find those files in the root folder of Oscommerce. Location of appropriate code depends on template and template modules. You may perform changes to the rest of the files in the same way. Please check video version of tutorial. There you will see more detailed information on how to put osCommerce site into catalog mode.

Removing prices

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

    osCommerce. How to put a site into catalog mode-10
  2. You should perform changes to files in which you have removed Add to cart button. Please check Removing Add to cart button section above. Search code by class, in our case class is productSpecialPrice. Please check code of includes\modules\new_products.php file. The highlighted code should be removed. Please note that code in your template may have another structure:

    osCommerce. How to put a site into catalog mode-11
  3. Remove appropriate code in \includes\modules\boxes\bm_specials.php file:

    osCommerce. How to put a site into catalog mode-12
  4. Remove code in product_info.php file:

    osCommerce. How to put a site into catalog mode-13
  5. Remove code in includes\modules\product_listing.php file:

    osCommerce. How to put a site into catalog mode-14
  6. Remove code in products_new.php file:

    osCommerce. How to put a site into catalog mode-15
  7. Remove code in specials.php file:

    osCommerce. How to put a site into catalog mode-16
  8. You may perform changes to the rest of the files in the same way. Please check video version of tutorial. There you will see more detailed information on how to put osCommerce site into catalog mode.

  9. We have removed prices:

    osCommerce. How to put a site into catalog mode-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. How to put a site into catalog mode-17
  2. Open admin section and go to Modules->Boxes. Click on the module:

    osCommerce. How to put a site into catalog mode-19
  3. Remove the module:

    osCommerce. How to put a site into catalog mode-20
  4. We have removed shopping cart module:

    osCommerce. How to put a site into catalog mode-21

Feel free to check the detailed video tutorial below:

osCommerce. How to put a site into catalog mode
This entry was posted in OsCommerce Tutorials and tagged catalog, mode, osCommerce. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket