News:

Looking for documentation? Take a look on our wiki

Main Menu

Free delivery combine with 24h ico

Started by marvays, November 08, 2018, 16:16:02 PM

Previous topic - Next topic

marvays

Hi all.
Now I doing redesign my eshop. Use latest joomla and VM.

I have free delivery for 5000,- CZk and more.

For product on stock and delivery to 24 hours I have nice ico. Know anyone how change product detail page for show extended ico for delivery to 24h if is product price is 5000,- and more?

For free delivery have this code:

<div class="Doprava">
<?php // zobrazení dopravy zdarma
   if ($this->product->prices['salesPrice']>=5000 ){ 
echo '<img src="/free-delivery.svg" title="DOPRAVA TOHOTO PRODUKTU JE ZDARMA" alt="DOPRAVA TOHOTO PRODUKTU JE ZDARMA" />';
}?>

</div>


For Availability I have in template two code, and i dont know, what is right:

<?php // Availability Image
/* TO DO add width and height to the image */
if (!empty($this->product->product_availability)) {
 $stockhandle VmConfig::get('stockhandle','none');
if($stockhandle=='none') {
$GifToPNG substr($this->product->product_availability0, -3); 
?>

            <div class="availability"> <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG?>png" class="FlexibleavailabilityIMG" alt="" /> </div>
            <?php 
if($stockhandle=='risetime' and ($this->product->product_in_stock $this->product->product_ordered)<1){
  $GifToPNG substr(VmConfig::get('rised_availability'), 0, -3);
?>

            <div class="availability"> <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG?>png" class="FlexibleavailabilityIMG" alt="" /> </div>
            <?php
if($stockhandle=='disableadd' and ($this->product->product_in_stock - $this->product->product_ordered)>=1){
  $GifToPNG = substr($this->product->product_availability, 0, -3);
?>

            <div class="availability"> <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG?>png" class="FlexibleavailabilityIMG" alt="" /> </div>
            <?php
if($stockhandle=='risetime' and ($this->product->product_in_stock - $this->product->product_ordered)>=1){
  $GifToPNG = substr($this->product->product_availability, 0, -3);
?>

            <div class="availability"> <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG?>png" class="FlexibleavailabilityIMG" alt="" /> </div>
            <?php
 
}
?>



<?php $product_available_date substr($this->product->product_available_date,0,10);
$current_date date("Y-m-d");
if ($product_available_date != '0000-00-00' and $current_date $product_available_date) { ?>

    <div class="availabilityDate">
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_AVAILABLE_DATE') .': 'JHtml::_('date'$this->product->product_available_datevmText::_('DATE_FORMAT_LC4')); ?>
</div>
<?php ?>


How i can use "if" free delivery + "if" send the product to the customer within 24 hours.

PS: My develop version of eshop is here: http://www.lukysipy.cz.hyperion.blueboard.cz/poe-lang-guillotine-x-camo-kladkova-kuse-185-lbs-s-puskohledem

PRO

?


  if (($this->product->prices['salesPrice']>=5000 )&& ($this->product->product_availability=='24h.gif')){
      echo 'HOLA_24-with-free';
      }