virtuemart 3.2 12
hello
i am looking for a code to add, or change, so when my clients add a product to cart, a banner over the thumb image will display.
see attached for the sample.
if anybody knows what to change and how, please respond.
i know there is css to do it, but i am not that good in coding
This is not so simple, because added to order, need to check the product in cart
thank you
i thought to write "IF" product is in cart, then change image or add image on top.
but thank you.
$cart = VirtueMartCart::getCart(false);
foreach ($cart->cartProductsData() as $cartProduct) {
if($cartProduct['virtuemart_product_id'] == $product->virtuemart_product_id){
// yourcode here
}
Some code is certainly missing and i dont tried, but you should cache this and not run this for each product.
thank you, if i will manage to do it, i will post code here