-- HikaShop version -- : 3.5.1
I'm trying to conditionally hide a container if the product_sale_start > current date. I should also note, I'm trying to use this on the product/show_default view file.
I tried to mimic what was on the product/quantity view
<?php
$now = time();
$start_date = (@$this->row->product_sale_start || empty($this->element->main)) ? @$this->row->product_sale_start : $this->element->main->product_sale_start;
$end_date = (@$this->row->product_sale_end || empty($this->element->main)) ? @$this->row->product_sale_end : $this->element->main->product_sale_end;?>
<div style ="<?php if($start_date > 0 && $start_date > $now) echo "display:none";?>">
</div>
<?php
?>
However, it seems like it's not pulling the product_sale_start data at all? Any thoughts?