Hi to all. It's been a while since I last posted here in the forums. I have been using, modifying and customizing several OC based cart sites, I just have this one inquiry regarding the shipping method part in checkout. I want to filter something in that part using the product_id of the items in the cart, but I can't even make it appear in the page. Can someone help me? Thanks in advance!
You'll have to edit the catalog/model/shipping/xxx.php file
to get the individual product ids you'll use:
to get the individual product ids you'll use:
Code: Select all
foreach ($this->cart->getProducts() as $product) {
if ($product['product_id'] == 24)) {
// do something
}
}
Qphoria wrote:You'll have to edit the catalog/model/shipping/xxx.php file
to get the individual product ids you'll use:
Code: Select all
foreach ($this->cart->getProducts() as $product) { if ($product['product_id'] == 24)) { // do something } }
Thank You very much!! I will try this now!!
Is it possible to filter the shipping method by the product_id in the checkout part? Like when they order product no 1, with product_id of 1, I will show this shipping method A. That's the main scenario I want to happen. Is there a way how to make it happen? Thanks in advance!
Not sure if you're interested in a commercial extension, but Restrict Shipping Methods can do what you want.
Who is online
Users browsing this forum: No registered users and 13 guests