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
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025