Accepting credit cards, warehouses, and shipping and fulfilling orders
Hello partners
I'm trying to charge an amount of $2.50 on an order where the manual payment method "04 - ESPAÑA CONTRAREEMBOLSO" is chosen.
I would like to know the reason why, when checking out, the value of 2.50$ is not being added to the order, the code I developed for this case was as follows, I cannot understand whether it is a Shopify limitation or some Syntax error / logic to capture this action.
{% if payment_method == '04 - ESPAÑA CONTRAREEMBOLSO' %}
{% assign surcharge = 2.50 %}
{% assign order_total = cart.total_price | money %}
{% assign new_total = cart.total_price | plus: surcharge %}
{% assign new_total_formatted = new_total | money %}
<p><strong>Note:</strong> A surcharge of {{ surcharge | money }} has been added to your order total for the payment method "04 - ESPAÑA CONTRAREEMBOLSO".</p>
<p><strong>New Order Total:</strong> {{ new_total_formatted }}</p>
{% endif %}
Thank you all for your contribution
I attempted to add a new line in the checkout process called 'Cash on delivery fee' by inserting the code into the theme.liquid file. However, it doesn't seem to be working as intended.
<!-- ##### Test ESPAÑA ##### --> {% if payment_method == '04 - ESPAÑA CONTRAREEMBOLSO' %} <script> $(document).ready(function() { var surcharge = 2.50; var total = {{ checkout.total_price | money_without_currency }}; var newTotal = total + surcharge; $('.payment-due__price').html('{{ "Cash on delivery fee" | t }}: ' + Shopify.formatMoney(newTotal, '{{ shop.currency }}')); $('.payment-due__currency').hide(); }); </script> {% endif %}
Hello @DenisPereira
This is not unfortunately possible inside Shopify settings, but you can do this by using our app Releasit Cash On Delivery which allows you to add a fee to any manual payment method like '04 - ESPAÑA CONTRAREEMBOLSO'
You can check and install the app on the Shopify App Store here: https://apps.shopify.com/cash-on-delivery-fee
The app is completely free to install and works on all Shopify plans and we also offer 24/7 support, so if you have any questions or you need help feel free to contact us from there!
I hope this helps you!
Marco from Releasit
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023