get product characteristic in checkout cart

  • Posts: 73
  • Thank you received: 1
11 years 4 months ago #110424

When the image of the product is displayed, i need to replace it with another image. This image contains variables from the characteristics.

I have 2 characteristics per product: Shell and Padding

the file name is: [shell]_[padding].png

How would I grab these two characteristics in the foreach loop in the product cart so I can replace the image with the corresponding one?

I know there is a built in functionality for that in hikashop, but I need to do it this way (long story)

Please Log in or Create an account to join the conversation.

  • Posts: 82758
  • Thank you received: 13346
  • MODERATOR
11 years 4 months ago #110428

You can do like that:
foreach($product->characteristics as $characteristic){
echo $characteristic->characteristic_value;
}

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum