There was another post about wanting to remove the add to cart button and replacing it with text that says something like “Please Call To Place Your Order”
I provided a fix, but it wasn’t really that great. So I thought about it and came up with a better fix.
There have also been some posts in the past about having the cart as just a catalog and not actually using it as a store. This mod should take care of that as well, kind of.
I have attached the mod to this post and as long as you haven’t modified any of the same files you should just be able to overwrite you files with these. Make sure you put the files in the right skin folder.
A demo can be seen at:
[url]http://www.jandkonline.com/cscart[/url]
The product that is set is the book The Zen of CSS Design : Visual Enlightenment for the Web (Voices That Matter)
Here are some screen shots:
Admin:
Index:
Categories:
Details:
The instructions are below.
1.)In you phpmyadmin add:
ALTER TABLE `cscart_products` ADD `call` CHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N' AFTER `product_code`
2.) Add new language variable:
Language variable: call_order
Value: Please Call To Place Your Order
3.) In core/fn.catalog.php
After:
// Define fields that should be retrieved
$fields = array (
'products.product_id',
'descr1.product as product',
'products.tracking',
'products.feature_comparison',
'products.zero_price_action',
'products.product_type',
'products.tax_ids',
'products.weight',
Add:
'products.call',
4.) In schemas/exim/products.php
After:
'Quantity' => array (
'#db_field' => 'amount'
),
Add:
'Call' => array (
'#db_field' => 'call'
),
And After:
'S' => array ( // selectboxes
'status' => array (
'name' => 'products_data',
'variants' => array (
'A' => 'active',
'D' => 'disabled',
'H' => 'hidden'
),
),
Add:
'call' => array (
'name' => 'products_data',
'variants' => array (
'Y' => 'yes',
'N' => 'no',
),
),
5.) In skins/your-skin/admin/views/products/update.tpl
After:
```php
{$lang.price} ({$currencies.$primary_currency.symbol}) :
class="input-text-medium" />
Add:
```php
{$lang.call_order}:
{$lang.no}
{$lang.yes}
```
6.) Create a file called: skins/your-skin/customer/addons/my_changes/hooks/products/buttons_block.override.tpl
In that file put:
```php
{if $product.call == "Y"}
{$lang.call_order}
{else}
{if !($product.zero_price_action == "R" && $product.price == 0) && !($settings.General.inventory_tracking == "Y" &&
$settings.General.allow_negative_amount != "Y" && ($product.amount <= 0 || $product.amount < $product.min_qty) &&
$product.is_edp != "Y" && $product.tracking == "B")}
<{if $separate_buttons}div class="buttons-container"{else}span{/if} id="cart_add_block_{$obj_id}">
{if $product.avail_since <= $smarty.const.TIME || ($product.avail_since > $smarty.const.TIME &&
$product.buy_in_advance == "Y")}
{if $product.has_options && !$show_product_options && !$details_page}
{include file="buttons/button.tpl" but_id="button_cart_`$obj_id`"
but_text=$lang.select_options but_href="$index_script?dispatch=products.view&product_id=`$product.product_id`"
but_role="text" but_name=""}
{else}
{if $extra_button}{$extra_button} {/if}
{include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_id`"
but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role}
{assign var="cart_button_exists" value=true}
{/if}
{/if}
{if $product.avail_since > $smarty.const.TIME}
{include file="common_templates/coming_soon_notice.tpl" avail_date=$product.avail_since
add_to_cart=$product.buy_in_advance}
{/if}
{elseif ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.tracking == "B"}
{$lang.text_out_of_stock}
{/if}
{if $show_list_buttons}
<{if $separate_buttons}div class="buttons-container"{else}span{/if} id="cart_buttons_block_{$obj_id}">
{hook name="products:buy_now"}
{if $product.feature_comparison == "Y"}
{if $separate_buttons}
{include file="buttons/add_to_compare_list.tpl" product_id=$product.product_id}
{/if}
{/hook}
{/if}
{/if} ```
What is added is just:
```php {if $product.call == "Y"}
{$lang.call_order}
{else} ```
And of course the closing {/if}
This is where you would select the class and such to change the look.
That's it, your done.
Brandon