Jump to content

[SOLVED] Restrict checkout according to supplier


Recommended Posts

EDIT: Solved via an alternative route.

 

 

We have certain suppliers' products that we are not permitted to send to certain countries. I am writing the code to do that within the shopping cart to add a message and hide the shipping options if the combination of delivery country and supplier mean that we can't ship to that country.

 

Basically, I need to loop through the products to check the supplier ID the check whether it is a supplier with restrictions then (if it is) check the delivery country to see if we can ship - then hide/show the shipping options accordingly.

 

However, I'm struggling to extract the data I need from the $cart object. I can't quite figure out how to get the highlighted data out of the second part of the array (after the [_products:protected] => Array part).

 

If someone could help it would be greatly appreciated.

post-421190-0-38968800-1365190309_thumb.png

Edited by Porpoise (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...