Free shipping on a product?

Developer
Từ United Kingdom
Thành viên kể từ thg 5 2016

Hi everyone,

Is there a way to set free shipping on certain products? 

I did think to set the product weight to 999 to trigger that effect but rather not, or if you can point me in the right direction to which files to edit that would be great.

Fantastic script by the way!

Thanks.

tim
Founder
Từ Sweden
Thành viên kể từ thg 5 2013
tim

One way could be to set the weight to 0. And don't return a shipping option if cart total weight is 0.

Other than that you would need to write a custom shipping module with conditions for e.g. the product IDs.

Developer
Từ United Kingdom
Thành viên kể từ thg 5 2016

Aha yes, that's opposite to the 999 but better idea, thanks a lot for that.

Moderator
Từ United States
Thành viên kể từ thg 10 2019

[quote]Other than that you would need to write a custom shipping module with conditions for e.g. the product IDs.[/quote]
Would you give us an example of using products ID's in a shipping module?  Were you just talking about hard-coding certain ID's in the module, or is there a more elaborate way?

tim
Founder
Từ Sweden
Thành viên kể từ thg 5 2013
tim

@s22_tech

  if (!in_array($item['product_id'], preg_split('#\s*,\s*#', $this->settings['product_ids']))) continue;
  ... code here for matched product ...
}
Chủ đề này đã bị đóng do không hoạt động trong thời gian dài. Không thể đăng bài vào chủ đề này.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.