Jump to content

newshopholder

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • First Name
    Jannie
  • Last Name
    Jongman

newshopholder's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Is this the only payment fee module available? Is there also one free or with a better price? http://addons.prestashop.com/nl/21686-extra-fee-or-discount-based-on-payment.html
  2. I don't know how to fix it, do you know a solution maybe? https://www.prestashop.com/forums/topic/531802-prestashop-sees-gift-as-paid-product/
  3. Yes, unfortunately it does So i gues it is a prestashop issue. I am searching for a solution, thanks!
  4. For some reason the style of the module has recently changed, weird lettertype and such. I updates the code with the facebook code (after body tag) and now its just fine!
  5. This is a real nice module! But 1 have one problem: when you use a voucher code then the calculation isn't correct. Free shipping is available from 15 €. But when my total product amount is: 15,34, and there is a discount code used of 0,45, he says: spend another 0,11 to get free shipping But offcourse that is also a problem of prestashop. Because 15,34 - 0,45 discount = lower then the 15 euro free shipping.
  6. There is a free module: https://www.prestashop.com/forums/topic/494147-free-module-spend-x-to-get-free-shipping/
  7. There is a topic on this forum about a count down until free shipping, but it is for older versions. The count down shows the remaining amount until the free shipping. For example: spend another 2 dollar to earn free shipping! Or, when people already have earned the free shipping: You earned free shipping! But i tried it on the 1.6 version and it worked! But there are a few problems.. Does someone now how to fix them? When you are in the shopping cart, and you use the + / - buttons to modify the quantity of a product, or delete a product, the count down works very smooth! Really nice. But when you refresh the shopping cart page, he says: You earned free shipping! But that is incorrect, because you see it also when you are (far!) under that free shipping amount. Also, when you go from another page to the shopping cart he shows the wrong: 'you earned free shipping!' text. Why does it work with Ajax, and why does it not work with a normal page loading? This is what i have changed: Shoppingcart.tpl: <p id="amount_free_shipping"> <span class = "ajax_shipping_free_price_span {if ($amount_until_free_shipping_float) <= 0} hidden {/if}">{l s='Spend' mod="blockcart"} <span class="ajax_shipping_free_price">{$amount_until_free_shipping}</span> {l s='more for FREE SHIPPING!' mod="blockcart"}</span> <span class = "ajax_shipping_free_price_free_span {if ($amount_until_free_shipping_float) > 0} hidden {/if}">{l s='Buying more than' mod="blockcart"} <span class="ajax_shipping_free_price_free">{$shipping_free_price}</span> {l s='earned you FREE SHIPPING!!!' mod="blockcart"}</span> </p> In modules/blockcart/blockcart.php $shipping_free_price= Tools::convertPrice((float)(Configuration::get('PS_SHIPPING_FREE_PRICE')), $currency); $amount_until_free_shipping_float = ($shipping_free_price - $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING)); and also; 'shipping_free_price' => Tools::displayPrice($shipping_free_price), 'amount_until_free_shipping' => ($shipping_free_price - $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING)), 'amount_until_free_shipping_float' => (float)($amount_until_free_shipping_float), In blockcart-json.tpl: "amount_until_free_shipping" : "{$amount_until_free_shipping|html_entity_decode:2:'UTF-8'}", "product_total": "{$product_total|html_entity_decode:2:'UTF-8'}", "shipping_free_price": "{$shipping_free_price|html_entity_decode:2:'UTF-8'}", And in the themes/<your theme folder>/js/modules/blockcart/ajax-cart.js: $('.ajax_shipping_free_price').text(jsonData.amount_until_free_shipping); if (parseFloat(jsonData.amount_until_free_shipping) > 0) { $('.ajax_shipping_free_price_span').each( function() { $(this).removeClass('hidden'); }); $('.ajax_shipping_free_price_free_span').each( function() { $(this).addClass('hidden'); }); } else { $('.ajax_shipping_free_price_span').each( function() { $(this).addClass('hidden'); }); $('.ajax_shipping_free_price_free_span').each( function() { $(this).removeClass('hidden'); }); } Thanks in advance!
  8. I have Prestashop 1.6 and i tried this solution, and it works a little! But there is one problem: When you are going to the shopping cart, (wathever the amount is), he shows: You earned free shipping! But when you are using then the quantity buttons (and here kicks ajax in i gues) he shows the correct amount until free shipping. Also when you are reload the shopping cart page, he shows again the wrong notice: 'you earned free shipping' Can someone help me with the rest of the code to fix it? In shoppingcart.tpl: <p id="amount_free_shipping"> <span class = "ajax_shipping_free_price_span {if ($amount_until_free_shipping_float) <= 0} hidden {/if}">{l s='Spend' mod="blockcart"} <span class="ajax_shipping_free_price">{$amount_until_free_shipping}</span> {l s='more for FREE SHIPPING!' mod="blockcart"}</span> <span class = "ajax_shipping_free_price_free_span {if ($amount_until_free_shipping_float) > 0} hidden {/if}">{l s='Buying more than' mod="blockcart"} <span class="ajax_shipping_free_price_free">{$shipping_free_price}</span> {l s='earned you FREE SHIPPING!!!' mod="blockcart"}</span> </p> In modules/blockcart/blockcart.php $shipping_free_price= Tools::convertPrice((float)(Configuration::get('PS_SHIPPING_FREE_PRICE')), $currency); $amount_until_free_shipping_float = ($shipping_free_price - $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING)); And: 'shipping_free_price' => Tools::displayPrice($shipping_free_price), 'amount_until_free_shipping' => ($shipping_free_price - $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING)), 'amount_until_free_shipping_float' => (float)($amount_until_free_shipping_float), In blockcart-json.tpl: "amount_until_free_shipping" : "{$amount_until_free_shipping|html_entity_decode:2:'UTF-8'}", "product_total": "{$product_total|html_entity_decode:2:'UTF-8'}", "shipping_free_price": "{$shipping_free_price|html_entity_decode:2:'UTF-8'}", And in the themes/<your theme folder>/js/modules/blockcart/ajax-cart.js: $('.ajax_shipping_free_price').text(jsonData.amount_until_free_shipping); if (parseFloat(jsonData.amount_until_free_shipping) > 0) { $('.ajax_shipping_free_price_span').each( function() { $(this).removeClass('hidden'); }); $('.ajax_shipping_free_price_free_span').each( function() { $(this).addClass('hidden'); }); } else { $('.ajax_shipping_free_price_span').each( function() { $(this).addClass('hidden'); }); $('.ajax_shipping_free_price_free_span').each( function() { $(this).removeClass('hidden'); }); }
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More