Free shipping on a product?

Developer
Fra United Kingdom
Medlem siden

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
Fra Sweden
Medlem siden
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
Fra United Kingdom
Medlem siden

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

Moderator
Fra United States
Medlem siden

[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
Fra Sweden
Medlem siden
tim

@s22_tech

  if (!in_array($item['product_id'], preg_split('#\s*,\s*#', $this->settings['product_ids']))) continue;
  ... code here for matched product ...
}
This thread has been closed due to long inactivity. Posting to it is not possible.
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.