Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Dropdown Shopping Cart(SKU# FLEX-00001)

TOPIC: total amount - showing amount which is to reach fr

total amount - showing amount which is to reach fr 7 years 8 months ago #12692

Hi, i was thinking to show in your drop down module info about free shipping. But i am not able to find variable to call total amount of the cart, can you help me?
$data->billTotal does not work

<?php if ($data->billTotal <1500 ) { ?>
<span>To have free shipping: <?php echo (1500 - ($product)) ?> Kč</span>

<?php } else { ?>
<span>Free shippin reached</span>
<?php } ?>
The administrator has disabled public write access.

total amount - showing amount which is to reach fr 7 years 8 months ago #12695

Hi,

This is not an easy task to handle. You need to edit 3 different places and 2 different files (both module and plugin PHP files and JavaScript lines in the module PHP). If you just edit the Module PHP file to add this feature, then AJAX scheme will be messed up and nothing will work.

This is a 100% custom modification and unfortunately we don't provide free support or step-by-step instructions for custom coding modifications.

You may purchase premium support:
www.flexiblewebdesign.com/premium-support

and let us take care this modification for you directly on your website though.

Regards.
Support
The administrator has disabled public write access.

total amount - showing amount which is to reach fr 5 years 10 months ago #14948

I was done it. But, how i can apply ajax for it?

original code was:
<div class="vmCartModule <?php echo $moduleclass_sfx; ?>" id="vmCartModule">
  <div class="total" id="total"> <?php echo count($data->products)?'<span class="flexibleLabel">'.(JText::_('COM_VIRTUEMART_CART_OVERVIEW').'</span><span class="flexibleNumber">'. $data->totalProduct.'</span>'): '<span class="flexibleLabel">'.JText::_('COM_VIRTUEMART_CART_OVERVIEW').'</span><span class="flexibleNumber">0</span>'; ?> </div>
  <!-- don't touch below or the cart won't process the AJAX request correctly -->
  <div id="hiddencontainer" style="display:none">
    <div class="cartTitle"></div>
 
      <div class="cartEmpty"></div>
 
      <div class="clear"></div>
      <div class="container">
      <div class="product_row">
        <div class="product_row_inner">
          <div class="image"></div>
          <div class="product_name_container"> <span class="quantity"></span>&nbsp;x&nbsp;<span class="product_name"></span> </div>
          <div class="prices"></div>
          <div class="product_attributes"></div>
          <div class="remove_button"><a class="vmicon vmicon vm2-remove_from_cart" onclick="remove_product_cart(this);"><span class="product_cart_id" style="display:none;"></span></a></div>
        </div>
      </div>
    </div>
 
  </div>

and i add this:
<div class="motivator" style="padding: 10px;position: absolute;width: 350px;right: 150px;bottom: -3px;padding: 10px;color: #e8102c;text-align: right;text-transform: none;"> 
	<?php if ($data->billTotal == 0) { ?>
            <span style="animation: blinker 2s linear infinite;">Při objednávce nad 4000,- je doprava zdarma!</span>
	<?php } elseif ($data->billTotal < 4000) { ?>
            <span style="animation: blinker 2s linear infinite;">Chcete dopravu zdarma? Přidejte ještě zboží za: <?php echo (4000 - ($data->billTotal)) ?>,-</span>
	<?php } else { ?>
            <span style="font-weight: 700; color: #109d16;">Vaše objednávka bude dopravena zdarma!</span>
	<?php } ?>
	</div>

under first line . . . .
<div class="vmCartModule <?php echo $moduleclass_sfx; ?>" id="vmCartModule">
	<div class="motivator" style="padding: 10px;position: absolute;width: 350px;right: 150px;bottom: -3px;padding: 10px;color: #e8102c;text-align: right;text-transform: none;"> 
	<?php if ($data->billTotal == 0) { ?>
.......
Last Edit: 5 years 10 months ago by Martin Richta.
The administrator has disabled public write access.

total amount - showing amount which is to reach fr 5 years 10 months ago #14955

hi,

If you just modify the module's file; your changes will be displayed only when the page gets refreshed. But when a product is added to cart; the AJAX is triggered (by the vmprices.js -- the official Virtuemart Core JS file)..

The AJAX gets the variable from the flexible dropdown shopping cart plugin and print them inside the module.. So; the changes must be made via plugin's file first and then the vmprices.js file must be re-organized accordingly.

I can't give you step-by step instruction about this edit, because this is 100% custom modifications (because you want to change how the elements work/look) and unfortunately we don't provide free support or step-by-step instructions for custom coding modifications.

You may purchase premium support:
www.flexiblewebdesign.com/premium-support

and let us take care this modification for you directly on your website though.

Regards.
Support
The administrator has disabled public write access.
Time to create page: 0.110 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo