hi.
now i try set in product detail page default.php this code:
<div style="color: #F44336;font-weight: 700;">
<?php
if(empty($this->product->prices) > 4000){
echo JText::_('COM_VIRTUEMART_CART_FREE_SHIPPING');
}?>
</div>
what is bad? nothing show for me :(
J!2.5.28 and VM 2.6.22 and VM 2.0.14
ok . . . this work for me in product detail page:
<div class="Doprava" style="color: #F44336;font-weight: 700;">
<?php // zobrazení dopravy zdarma
if ($this->product->prices['salesPrice']>=4000 ){
echo JText::_('COM_VIRTUEMART_CART_FREE_SHIPPING');
}?>
</div>
but not in category page. why?
try
<div class="Doprava" style="color: #F44336;font-weight: 700;">
<?php // zobrazení dopravy zdarma
if ($product->prices['salesPrice']>=4000 ){
echo JText::_('COM_VIRTUEMART_CART_FREE_SHIPPING');
}?>
</div>
Quote from: GJC Web Design on January 30, 2017, 23:04:58 PM
try
<div class="Doprava" style="color: #F44336;font-weight: 700;">
<?php // zobrazení dopravy zdarma
if ($product->prices['salesPrice']>=4000 ){
echo JText::_('COM_VIRTUEMART_CART_FREE_SHIPPING');
}?>
</div>
work it :)
i must change to:
<?php if ($product->prices['salesPrice']>=4000 ){ ?>
<div class="Doprava-kategorie" ><div>Doprava zdarma</div></div>
<?php } ?>
thx alot
<?php } ?>
You should use vmdebug, that makes it easier, then you would have seen that prices is always an array and never empty
now i try make this code for cart . . . (free delivery price - add products = price to free delivery for this order) :)
You should use the right option for it. and not write your own stuff. There is the optoin "free shipment if price is higher than" doing anything for you.
i know. But i have one website on joomla 2.5.28 and Vm 2.0.14