Contributions

Features (Category Index)
Search: 

Disable Buy Now and Shopping Cart

Mod Name: Disable Buy Now and Shopping Cart
Author: Kataklysmik
Date: 04/09/2005
Email: kata_klysmik@justingrimes.com

BASED ON THE ORIGINAL CONTRIBUTION BY:
non_online_purchase v1.01
author: Kon Angelopoulos
email: angek@angekdesign.com.au
date: 4th January 2004

Posted as a new contribution since it handles the Buy Now and Shopping Cart functions differently and cannot be
applied easily if you have already done the non_online_purchase mod. We also wanted something with better keywords
in the title to help people find it easily.

This contribution removes the "Buy Now" and "Add To Cart" buttons for selected products by adding a checkbox to
the categories.php page when you add or edit a product. You can set the default behavior for this feature in the
Product Listing menu under Configuration. This allows you to decide whether the default is to allow the buttons,
or not depending on your needs. You can also change this on a per item basis using the checkbox added to the add
and edit functions for the products.

We have included all the files modified as well as a SQL script to make the change to the database.
If you have a clean installation of 2.2 MS2 you can simply run the sql script, and overwrite your
existing files with those provided for a quick mod. All of the changes are marked with "JLG Disable Buy Now and Shopping Cart"
so you can find them easily.

Files Modified:
catalog/products_new.php
catalog/product_reviews_write.php
catalog/product_reviews.php
catalog/product_reviews_info.php
catalog/product_info.php
catalog/includes/modules/product_listing.php
catalog/includes/languages/english.php
catalog/admin/categories.php

Tables Modified:
products
configuration

Expand All / Collapse All

wouldn't work at first. 19 Aug 2007

The only way I could get this working was to change:

<td class="main">'.tep_draw_checkbox_field('disable_addtobasket', 'Y', true, $mInfo->disable_addtobasket)/* . '  true   ' . tep_draw_radio_field('disable_addtobasket', 'N', false, $mInfo->disable_addtobasket) . '   false'*/.'</td>';

To:

<td class="main">' .tep_draw_radio_field('disable_addtobasket', 'Y', true, $mInfo->disable_addtobasket) . '  true   ' . tep_draw_radio_field('disable_addtobasket', 'N', false, $mInfo->disable_addtobasket) . '   false' . '</td>';


And change this:

<td class="main">'.tep_draw_checkbox_field('disable_addtobasket', 'Y', false, $mInfo->disable_addtobasket)/* . '  true   ' . tep_draw_radio_field('disable_addtobasket', 'N', false, $mInfo->disable_addtobasket) . '   false'*/.'</td>';

To:

<td class="main">' .tep_draw_radio_field('disable_addtobasket', 'Y', false, $mInfo->disable_addtobasket) . '  true   ' . tep_draw_radio_field('disable_addtobasket', 'N', false, $mInfo->disable_addtobasket) . '   false' . '</td>';


(in admin/categories.php)

The file contained here is only the categories.php file.

Disable Buy Now and Shopping Cart Kataklysmik 13 Apr 2005

Note: Contributions are used at own risk.