shipping conditions amount rule does not work

Phoca Cart - complex e-commerce extension
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

Yes I tried but it does not help. I found out that error ocurs when the total amount is less than or equal to the threshold price minus the shipping cost... huh I think. :) For example:
Shipping price is 69 SEK and limit is 699 SEK.
If total order sum is between 630 SEK and 699 SEK (699-69=630) it will display error. If it is 629 SEK or less and 700 and higher order will be accepted. :)

So it calculate shipping price. I tried to set shipping price to 70 SEK and difference then is 70 so it will accept total sum of 628 SEK and less.

Image
Image

Tags:
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

To exclude current project I installed latest Joomla 5.1.0 and latest Phoca 5.0.0Beta51 with example data on my localhost and result is the same.

Image
mino182
Phoca Professional
Phoca Professional
Posts: 183
Joined: 12 Feb 2015, 13:30

Re: shipping conditions amount rule does not work

Post by mino182 »

I think, there could be swapped variables subtotal / total somewhere...
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

I don't know. It has something to amount rule treshold and shipping price.

What ever amount you set as shipping price it will create exact gap between amount rule treshold reduced by the amount of the shipping price when the error shows.

You cannot make order so it is serious bug. 😳
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

I found temporary fix.
In /administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 461 I set

Code: Select all

$shippingNotFoundAllowProceed = false;
to

Code: Select all

$shippingNotFoundAllowProceed = true;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48154
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: shipping conditions amount rule does not work

Post by Jan »

Hi, not sure if I understand it correctly, but shipping price cannot be included in amount rule. As when we decide about showing shippings, we don't know which shipping we display so we don't the the price for shipping. This is why the rule is applied to subtotal without shipping.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

Create two shipping methods based on amount rule.
Payed shipping for amount up to 100€ and free shipping for orders over 100€.

Shipping for orders up to 100€ costs 20€

Try to create order that costs 88€ (excluding shipping costs)

You won't be able to confirm order.

Video might help to understand:
https://www.youtube.com/watch?v=rrcQfsglrlQ
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48154
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: shipping conditions amount rule does not work

Post by Jan »

Hi, thank you for the info, please test Beta 55 and let me know if this is OK now:

https://github.com/PhocaCz/PhocaCart/re ... Beta55.zip

Jan
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 335
Joined: 07 Nov 2018, 14:55

Re: shipping conditions amount rule does not work

Post by Nidzo »

Thank you Jan! I tested latest Beta and it works fine now. 🍻
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48154
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: shipping conditions amount rule does not work

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
Post Reply