andrewdennis Posted August 20, 2010 Posted August 20, 2010 I'm building a site for a new client who is selling some items that can't be shipped to certain locales within the US. I started by modifying the Restrict Delivery mod, where certain items are marked as "export controlled" and of course, I need finer control than just restricting which countries I can and can't ship to. I have 5 different categories that can be marked as "restricted" (and thus far, everything is working correctly) Where I get stuck is at the shopping_cart page; In the original restrict delivery mod, the code for "checking" for export controlled items is: if ($order->delivery['country_id'] != STORE_COUNTRY) { $any_export_controlled=0; $productsex = $cart->get_products(); for ($i=0, $n=sizeof($productsex); $i<$n; $i++) { $export = tep_check_export($productsex[$i]['id']); if (tep_not_null($export)) { $any_export_controlled = 1; } } I know I'll need to modify that to reflect something like the following, but don't know what syntax to use: if ($order->delivery['zone_id'] = list of states or zones I can't ship to) { $any_export_controlled=0; $productsex = $cart->get_products(); for ($i=0, $n=sizeof($productsex); $i<$n; $i++) { $export = tep_check_export($productsex[$i]['id']); if (tep_not_null($export)) { $any_export_controlled = 1; } } Have I got at least the right idea here? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.