Author Topic: Free delivery combine with 24h ico  (Read 109 times)

marvays

  • Jr. Member
  • **
  • Posts: 122
    • http://marvays.cz
  • Skype Name: marvays
Free delivery combine with 24h ico
« on: November 08, 2018, 16:16:02 pm »
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:
Code: [Select]
<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:
Code: [Select]
<?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
 
}
?>

Code: [Select]
<?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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10291
  • VirtueMart Version: 3+
Re: Free delivery combine with 24h ico
« Reply #1 on: November 09, 2018, 01:29:03 am »
?


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

marvays

  • Jr. Member
  • **
  • Posts: 122
    • http://marvays.cz
  • Skype Name: marvays
Re: Free delivery combine with 24h ico
« Reply #2 on: November 09, 2018, 09:23:19 am »
Thx PRO