Jump to content

Major carriers problem when restrictions applied within product settings


facethefuture

Recommended Posts

Prestashop version: 1.7.5.1

There is a major issue with Shipping / Carriers on Prestashop 1.7.5.1.

Our Prestashop store has specific products that can only go via certain carriers.

If you add one product to your cart, that has a restriction, this works as it should and the message - Unfortunately, there are no carriers available for your delivery address. - shows on checkout.

However, if you add another product to your cart, that has no carrier restriction, it allows the customer to complete checkout, and then splits the order into 2 orders (they then show as linked orders in admin).

I noticed this error in the past on Prestashop 1.6, however the work around to this was to disable one page checkout and used the 5 step process.

There is no such option in Prestashop 1.7. and this issue is going to cause a lot of problems have we specific products we cannot ship outside the UK.

Does anyone have a solution for this?

Thank you

 

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 1 month later...

I found a away round it by manipulating weights. Our products don't have weights within Prestashop, so if you set different weight parameters within your shipping settings, then apply the weight ranges to the products, this will work. Not ideal but at least it's a way round it.

There's a bit more info on this thread:

https://www.prestashop.com/forums/topic/927202-ps-174-multiple-carriers-conflcit-on-checkout/?tab=comments#comment-3159487

Link to comment
Share on other sites

  • 2 months later...

I face the same problem.

The issue is located on:

- Class:  Cart (classes/Cart.php)

- Function: getDeliveryOptionList

The cart products are splited into packcages grouped by carrier availability.

If there are multiple packgages and 1 of it has available carrier, function response is positive and allows to make order even though some of the products has not available carrier.

Quick fix:

Find:

if (count($packages) == 1 && count($package['carrier_list']) == 1 && current($package['carrier_list']) == 0) {

Replace by:

if (count($package['carrier_list']) == 1 && current($package['carrier_list']) == 0) {


This way, if 1 of the packages has not available carrier, order is blocked and "no carrier avaibable" message is displayed on checkout proccess.

Pro fix (I have not done it yet)

Throw error messages to display real block reason and not just generic "no carrier available" message.

 

 

Edited by ACC - Txomin (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...
On 4/8/2020 at 6:48 PM, ACC - Txomin said:

I face the same problem.

The issue is located on:

- Class:  Cart (classes/Cart.php)

- Function: getDeliveryOptionList

The cart products are splited into packcages grouped by carrier availability.

If there are multiple packgages and 1 of it has available carrier, function response is positive and allows to make order even though some of the products has not available carrier.

Quick fix:

Find:

if (count($packages) == 1 && count($package['carrier_list']) == 1 && current($package['carrier_list']) == 0) {

Replace by:

if (count($package['carrier_list']) == 1 && current($package['carrier_list']) == 0) {


This way, if 1 of the packages has not available carrier, order is blocked and "no carrier avaibable" message is displayed on checkout proccess.

Pro fix (I have not done it yet)

Throw error messages to display real block reason and not just generic "no carrier available" message.

 

 

Does not work on 1.7.7.0 :(
Any ides?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...