Hi,
sorry for the wrong coding patch.
If you take a look at the IF Statement carefully, you will notice the nonsense right away.
if (($field->field_type == "E") || ($field->field_type == "A")) { ?>
means:
If the Field Type is E or A then do below;
But it should have been:
If the Field Type is E or A then don't do below;
So the correct IF Statement should have been this:
if (!($field->field_type == "E") || ($field->field_type == "A")) { ?>
IF you want to hide the "add to cart" functionality when the "custom Field" is exist (and hidden) for that particular product; this requires little extra coding patch which is not covered by our free support, because it is a custom change. But it is well configured and the concept is working efficiently with the CleanMart Template though.
This is why we are always saying CleanMart is the "best" Virtuemart 2 Template we have ever developed. FashionMart is an almost 3 years old template. Comparing FashionMart with CleanMart is as same as comparing iPhone 3g with iPhone 5S ;)
We keep releasing updates to make FashionMart and our other old templates to be compatible with the new VM versions, but usually we decide to spend more time adding news features and functionalities - like this one for example - our newer templates instead of old ones.
- Browse the DEMO of CleanMart (category page):
demo.flexiblewebdesign.com/cleanmart/index.php/vm-categories/category-default-layout
Attachment ScreenShot2014-04-17at12.52.25AM.png not found
- Mouse hover the "Add to Cart" button. And you will see what i meant.
If that product has "Custom Field" and if that custom field is not displayed at that time, then the add to cart button goes to product details page instead of adding the product right away to avoid adding to product without choosing the Custom Field. Which eliminates the fact that the shopper will accidentally add the product cart without being aware there some product attributes they should have selected.
Regards,
Support