Hi, i need show custom field from position addtocart on category page but only one from all on position addtocart.
Is it possible show custom field based example ID ?? or other identification ?
Can you help me with code ??
Many Thanks
Virtuemart have no context option, so you need to code yourself a solution.
You can check for eg, if you are in category or not and check the customfield_id of the custom fields.
QuoteHi, i need show custom field from position addtocart on category page but only one from all on position addtocart.
I don't understand, can you write more information?.
- one customfield (add to cart) in category page for all products in one place (it is sound like catproduct plugin) or one for every product on category page (== 6 products == 6 customfields add to cart) ?
I have two custom fields for products in the addtocart position.
I show both in the product detail.
But I only want to see one of them on the categories page.
It cannot be solved by assigning one of them to another position because these are the inputs of the basket so it must be in the addtocart position.
Therefore, my question is whether it is possible to display a custom field from the addtocart position based on an ID or other identifier.
well thank you
Yes,
in PHP you can use IF/ELSE custom code
and then show this customfield in category view
Ok . please can you please show me some sample code? How to do it ?
thanks
But perhaps a better solution is to use another positionand not addtocart ?
Why you have field to show in category in the cart position ?