News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Conditionaly show add to cart when using stockable variants

Started by patrick356356, March 16, 2013, 15:58:29 PM

Previous topic - Next topic

patrick356356

I need a solution to conditionaly show the add to cart button when using stockable variants. This because a user that isn't logged should instead of a cart only be able to do a wish list. If the user is logged in on the other hand he should be able to add to cart. The reason for this is that we only sell to retailers but like anyone to be able to make a list on our web page and bring it to their prefered retailer.

When trying to solve this I found out that it seem like add-to-cart and quantity fields are rendered different ways if it's a normal product or if it's a "stockable variant" product. The add-to-cart button is added to the page in the file default_addtocart.php. However if you comment out the line adding this button (echo shopFunctionsF::getAddToCartButton($this->product->orderable) the button disappears from all normal products but NOT from "stockable variant" products. And even more strange is the fact that if you look in the browsers code window it isn't there any more BUT IT APPEARS ANYWAY!!!! Strange or super strange?? Cleaning cach doesn't matter...

Please anybody...help... I just can't find any solution...

/ Patrick