# [Free Module] Cash on Delivery with fee PLUS PS 1.6-1.7

## Recommended Posts

I tried it few hours ago, without success 😕

##### Share on other sites

• 4 weeks later...
• Replies 539
• Created

#### Posted Images

Hello, I have installed the module and everything is fine, but I can't set a € 3 flat rate from (0 to 100) and a 3% from (100 to 600). It's possible ?

I have 1.7.4.4 PS
Module 1.1.8

##### Share on other sites

Posted (edited)
26 minutes ago, Frennsu said:

Hello, I have installed the module and everything is fine, but I can't set a € 3 flat rate from (0 to 100) and a 3% from (100 to 600). It's possible ?

I have 1.7.4.4 PS
Module 1.1.8

You should create two conditions, the first setting the flat rate of €3 in FEE CALCULATION and the cart value is less or equal of €100 in VALIDATION RULES. The second should be set to 3% percentage and greater or equal of €100 respectively.

Since the breakpoint is €100 for both conditions, you have two ways to define how the module will behave for an order of exactly €100.

The first one is you can set the breakpoints at €99.99 for flat rate and €100 for percentage, or €100 for flat rate and €100.01 for percentage, depending on what you want.

The second way, if you have both breakpoints at €100 and assuming you have the Behavior option set to "Apply the highest in the list, matching fee", the first condition in the list from top to bottom will be used, so if the flat rate condition is above the percentage, both having the breakpoint set to €100 and the cart's value is €100, the flat rate one will be applied.

If you want something different above €600 (e.g. no fee) you need a third condition, according to the rules I wrote above,

Edited by sakgiok
Added some text. (see edit history)

##### Share on other sites

Fixed and working. Thanks

##### Share on other sites

Hi Sakgiok,

I have a problem on PS 1.7.7.2, the Order Confirmation email is sent twice, one email with full details of the order and one containing only {variables} found on the email templates on all fields.

This happens only when COD is used for payment, but not with bankwire nor with card payment.

If it matters, I'm using PHP 7.3.

Thank you very much in advance.

##### Share on other sites

• 3 weeks later...
On 3/7/2021 at 6:56 PM, Coloranti said:

Hi Sakgiok,

I have a problem on PS 1.7.7.2, the Order Confirmation email is sent twice, one email with full details of the order and one containing only {variables} found on the email templates on all fields.

This happens only when COD is used for payment, but not with bankwire nor with card payment.

If it matters, I'm using PHP 7.3.

Thank you very much in advance.

##### Share on other sites

Hi @Coloranti, it seems I missed your post somehow... Which method of integration are you using? Are you adding the fee to the carrier or are you using a cod product? Try using the other one and see if this helps.

##### Share on other sites

On 3/23/2021 at 5:06 PM, sakgiok said:

Hi @Coloranti, it seems I missed your post somehow... Which method of integration are you using? Are you adding the fee to the carrier or are you using a cod product? Try using the other one and see if this helps.

Γεια σου @sakgiok, thanks for responding.

I've tried switching to "add a COD product to the order" but the problem is the same: customer is getting two times the order confirmation mail, but only one instance is correct, the second is just {variables} instead of products, fees, etc.

What I didn't make clear in my first post: the correct mail has as subject "order confirmation" and the second (wrong) one has as subject "processing in progress".

I tried using another COD plugin I the problem is still there...

UPDATE: I believe I've solved this by creating a new status in shop parameters/order settings/statuses and assigned order_conf email template to be sent to customers. Now it's only sending that one email.

Though I'd still want to understand why the original "processing in progress" status was sending two emails, so if you have any thoughts, please share.

Thank you very much for this great and useful module!

• 1

##### Share on other sites

What this warning box should mean?

##### Share on other sites

• 1 month later...

@sakgiok

Hi, please can you help why {id_order} variable is missing in mail template (order_conf) after creating the order? When i resend the email tempalte ORDER_CONF , the variable is shown... Thanks,

Where, if wich file i can insert it?

Thanks,

##### Share on other sites

Hi. We have a small issue. It seems the module does not add the tax. Could you tell me what is wrong ?

http://prntscr.com/12hryif

##### Share on other sites

12 minutes ago, christinik2011 said:

Hi. We have a small issue. It seems the module does not add the tax. Could you tell me what is wrong ?

Hi, the module doesn't add the tax, the tax is specified so it can be visible in the invoice. The cod fee value you specify must include the tax.

##### Share on other sites

Posted (edited)

Ok, but.... for a order that has total value, of 1000 EURO, with Minimum 2 euro fee, and 10% Percentage..... how does it calculate the final fee for the order ? It does not add vat over the fee  ? Even if it is percentage only ?

Lets say, no minimum fee. Just the 10%

Final value should be 100 EURO plus tax.

Edited by christinik2011 (see edit history)

##### Share on other sites

If the value you specify is without taxes, you have to add the tax in the percentage.

So minimum fee should be €2.00 + (€2.00 * 21%) = €2.42 and the percentage if you want 1% should be 1% + (21% * 1%)=1.21% so for an order of €1000.00 the fee should be €12.10 (€10.00 for the fee and €2.10 for tax).

For 10% fee the value should be 12.1% so the final fee is €121.00 (€100.00 fee + €21.00 tax).

##### Share on other sites

Posted (edited)

PHP ERROR LOG:

```PHP Notice:  Undefined variable: relative_protocol in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 351
PHP Notice:  Undefined variable: ssl in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 354
PHP Notice:  Undefined index: product_quantity_in_stock in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 371

PHP Notice:  Undefined index: product_quantity_in_stock in MYSITE.com/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 54```

Edited by Kaper (see edit history)

##### Share on other sites

9 minutes ago, Kaper said:

PHP ERROR LOG:

```
PHP Notice:  Undefined variable: relative_protocol in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 351
PHP Notice:  Undefined variable: ssl in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 354
PHP Notice:  Undefined index: product_quantity_in_stock in MYSITE.com/modules/codwfeeplus/validate_functions/16123.php on line 371```

I can't find these variables in the file lines it says. Have you changed the file 16123.php manually somehow?

##### Share on other sites

Oh, sorry... yes i have changed theese files.

I am gonna take a look on it :). Nevermind. My bad

##### Share on other sites

Dear,
I don't know why in some cases I have an error, in payment section of the order view I see "Warning €69.90 paid instead of €66.90". The Cod fee (€3,00) is not added to shipping cost.

##### Share on other sites

Hi @maccio, I would try to find what's common with these orders that give this message, to find a probable cause.

##### Share on other sites

1 hour ago, sakgiok said:

Hi @maccio, I would try to find what's common with these orders that give this message, to find a probable cause.

It seems random... on over 2000 orders it was wrong only 2 times.

##### Share on other sites

• 2 weeks later...

Hi, very nice module, it perfectly fits my needs. The only problem is that on the validation phase the module remains in a sub-section intead of being in the mail page (banner module and right column remain active), do you have a suggestion? I report the examples (comparing with another payment module that is installed and displays correctly).

Thank you very much for your help

• 1

##### Share on other sites

Hi @mante80, thanks for the kind words. If I understood correctly, you need to go in the theme customization in your back office and tweak the layouts. For PS 1.7 is in Design->Theme & Logo and hit the button Choose Layouts. There, you should find module-codwfeeplus-validation and choose Full width.

##### Share on other sites

Thanks for the prompt Reply, much appreciated! I think it's exactly what you say! I've the version 1.6 by the way. I tried looking into theme configuration and I successfully removed the left colum (fig 1) but I find no way there to make also the banner module disappear

##### Share on other sites

Solved correcting the banner module hooking! Thank you very much for your help!

• 1

##### Share on other sites

Hi I have installed the plugin on 1.6.1.20, but cannot see the Configure option in dropdown, only Enable and Disable, when enabled it works, I would like to add a flat fixed fee for all orders selecting COD.

##### Share on other sites

Well, that is not my module that you're trying to configure, it's the default prestashop cod module.

• 1

##### Share on other sites

9 hours ago, sakgiok said:

Well, that is not my module that you're trying to configure, it's the default prestashop cod module.

• 1

##### Share on other sites

Fantastic module worked straight away thank you!

• 1

##### Share on other sites

Hi I have installed the plugin on 1.6.1.20, Configured as attached (Fixed fee - add product) but the COD fee still shows 0 at the final screen, can you please assist as to what I am doing wrong?

##### Share on other sites

Since the cod is calculated correctly as shown on the second image, maybe a template issue for the confirmation page? If you go ahead with the purchase, is the cod applied normally?

##### Share on other sites

4 hours ago, sakgiok said:

Since the cod is calculated correctly as shown on the second image, maybe a template issue for the confirmation page? If you go ahead with the purchase, is the cod applied normally?

All I did was uninstall - reinstall and kept the conditions to minimum and it works well now - I would believe it was something to do with my conditions. although I would like to have some conditions but I can live without it.

Many thanks for the module and your super quick responses, much appreciated!!

Previously I noted one strange behavior that after a few enables - disables the module would not toggle to Enable / Disable and would remain in the same state - I tried logoff-login but the same, I had to uninstall, delete and then it would work and again stopped after a few enable disables. there was nothing logged in the error.log

I am now not disabling it as it may get stuck and the store is live.

• 1

##### Share on other sites

• 5 weeks later...

Hi

Thank you very much for the module.

I had my first orderthat applied to this module and I have a problem/error, in payment section of the order view I see "Advertencia 67,00 € pagado en vez de 65,00 €". The Cod fee (2,00€) is not added to shipping cost.

Attached capture of the configuration that I have for what it's worth.

A lot of thanks

##### Share on other sites

PrestaShop version?

##### Share on other sites

5 minutes ago, sakgiok said:

PrestaShop version?

1.7.5.2

##### Share on other sites

Any errors in any logs? I can't be of any help without more data. This error has been reported before as far as I remember, though I'm not sure about the cause. Is it happening to every order? Are there any other modules that might cause it, especially any courier modules?

##### Share on other sites

Posted (edited)
20 minutes ago, sakgiok said:

Any errors in any logs? I can't be of any help without more data. This error has been reported before as far as I remember, though I'm not sure about the cause. Is it happening to every order? Are there any other modules that might cause it, especially any courier modules?

I don't know if these records can give you some information ...

It is the first and only order on the web since I installed the module

Edited by aglum
Edit: upload other log (see edit history)

##### Share on other sites

• 2 weeks later...

Hello Sakgiok,

Running 1.7.7.3 with warehouse theme and I got stuck with 2 issues.

1. The module is calculating correctly the amount, but when order is confirmed, in the BO it looks like the client has "paid" twice (attachment cod).

2. When a client chooses to pay with COD, it doesn't show the amount  in the resumen of the cart (attachment cod1)

Log has no errors and in attachment cod2 you can see the configuration.

Hope you can help me.

Regards

##### Share on other sites

For the second problem, you need to modify your theme template and/or the module. Unfortunately, it needs some programming skills to do it and I'm not sure I can help you right now with this, due to time constrains.

For the first one, that's very odd... Do you have another cod module installed? It's strange that the two entries of cod fee display different names for the cod module.

##### Share on other sites

I had another COD module running, but it was de-activated before installing your module. Maybe I should delete it entirely.

##### Share on other sites

Posted (edited)
5 minutes ago, Robbert Hagen said:

I had another COD module running, but it was de-activated before installing your module. Maybe I should delete it entirely.

well answering myself, that didn't work...still 2 payment

Edited by Robbert Hagen (see edit history)

## Create an account

Register a new account

×

• #### Go back to prestashop.com

×
• Create New...