I have a magento multi-store website. I have three stores. I want to remove/hide the Add to cart button from one store. But the other stores should display it.
Can I do this from admin panel? What is the easyest solution?
I have a magento multi-store website. I have three stores. I want to remove/hide the Add to cart button from one store. But the other stores should display it.
Can I do this from admin panel? What is the easyest solution?
In your template you could check for the store id, for instance, if you don't want it to show in store id 3...
app/design/frontend/[package]/[theme]/template/catalog/product/view/addtocart.phtml
...
<?php if ($_product->isSaleable() && Mage::app()->getStore() != "3"): ?>
<div class="add-to-cart">[...]</div>
<?php endif ?>
...
And that should remove the add to cart for the product pages.
You could leave the button there but disable it's ability to be added to cart with a module that and overrides Mage_Checkout_CartController::addAction()
. You could redirect the user and add a message saying that it's disabled, etc.
The best solution was to use a module. Now I can set from admin panel for each store (or website/global) to:
And I can also set this settings to work for certain user groups. There's no need for extra themes or some "hard code" :) We need to work clean..
This is the Module (and it's free):
http://www.magentocommerce.com/magento-connect/hide-cart-price-5914.html
TAKE CARE: This module will probably not work out of the box. When i installed the module it gave an error page with Class 'Zend_log' not found in Rule.php, this error page came up when i visited 'system -> configuration' and 'customer->IG Hide Cart and Price Rules' and in the frontend at every product. well this is because of a bad name for a function in the Rule.php file. my not creative solution was(because of the late time): go to: /app/code/community/IG/HideCartPrice/Model/Rule.php Find line 129: public function load($id) Change it to: public function load1($id) Find line 131: parent::load($id); Change it to: parent::load1($id);
Hope I helped!