add class in hikashop_container Div (img-title listing_div)

  • Posts: 138
  • Thank you received: 4
4 years 11 months ago #316995

-- HikaShop version -- : 4.2.3

hi,
I use product listing div .
I want when product have discount ,

<div class="hikashop_container">
line:180 in product / listing_div.php add a custom class for example:
<div class="hikashop_container discount_product">
how do it?
<?php if(!empty($this->row->discount)) { ?>
<div class="hikashop_container discount_product">
<?
}
else if(empty($this->row->discount)) { ?>
<div class="hikashop_container">
<?php
}
?>
but not worked! :( :(
please help me


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317003

Hi,

On the line where you have

<div class="hikashop_container">
$this->row doesn't exist yet.
You can see that this variable is set a few lines below with the code:
$this->row =& $row;
So in your code, you want to replace $this->row by $row and it will work.

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

Time to create page: 0.047 seconds
Powered by Kunena Forum