Post by world-of-satellite » Thu Nov 11, 2010 9:58 pm

As the title, I need to set free shipping to certain products only. I've seen this thread http://forum.opencart.com/viewtopic.php?f=114&t=19450 but nothing seems to have moved on.

I'm willing to pay for a module if there is one.

Active Member

Posts

Joined
Sun Jun 27, 2010 1:40 pm

Post by world-of-satellite » Thu Nov 11, 2010 10:08 pm

Could this module be used http://theqdomain.com/ocstore/opencart_ ... by_product

Say for instance set the shipping price on certain products to zero to just UK shipping zones?

Active Member

Posts

Joined
Sun Jun 27, 2010 1:40 pm

Post by Qphoria » Fri Nov 12, 2010 11:02 am

I am working on supporting geozones but at the moment it does not support them. Additionally, if you wanted to make some items free, then you would have to set prices for all other items. Not sure of the best way to handle this

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Sun Nov 14, 2010 11:54 pm

Yeah, it's a bit of a tricky one really, no easy way to do it except set prices specifically like Q says

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by world-of-satellite » Tue Nov 30, 2010 6:17 pm

Qphoria wrote:I am working on supporting geozones but at the moment it does not support them. Additionally, if you wanted to make some items free, then you would have to set prices for all other items. Not sure of the best way to handle this
Is there anyway a product can be set to free shipping in Product > Data > Requires shipping? So you could have yes, no and free shipping.

Active Member

Posts

Joined
Sun Jun 27, 2010 1:40 pm

Post by world-of-satellite » Tue Nov 30, 2010 6:49 pm

Just had a thought. Could one way round this be as follows: -

1. Set product weight to Zero.
2. In weight based shipping for the zone where free shipping will apply add a 0:0.00 shipping cost for goods set to zero weight.

So with the above in place all items will get a shipping charge unless weight is set to zero.

What do you guys think?

Active Member

Posts

Joined
Sun Jun 27, 2010 1:40 pm

Post by Johnathan » Tue Nov 30, 2010 10:01 pm

Seems like a clever solution, unless you need to know the weight (or display it to the customer) for some reason.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by tvieira24 » Sun Dec 05, 2010 4:05 am

On my old oscommerce cart I used to do free shipping per product using "0" as the weight value. It seems like this can be done pretty easily by modifying the existing free shipping module to pull weight rather than price.

Newbie

Posts

Joined
Sun Dec 05, 2010 4:04 am

Post by cashman9 » Wed Dec 08, 2010 2:35 pm

An option is to create a module that would have a checkbox in the product page and asking, eligible for free shipping, and then a user chooses shippings, he can choose free shippings. It should be on specific items only.

Another option is create a module that will require a selection of items from the module itselfs that eligible for free shipping and will show up for that items in the check out.

Can anyone create this module?

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by cashman9 » Thu Dec 09, 2010 4:42 am

Thanks to Q, module has been updated to allow this:
http://forum.opencart.com/viewtopic.php?f=24&t=23895

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by sebastienpilon » Wed Jan 09, 2013 10:34 am

This is what I did and it works just fine. (opencart Version 1.5.4)

First of all, you'll need to modify the query who fetch the datas in the product page because no shipping field is returned from the mysql request . As you probably have seen, their is a radio button "Shipping required"
in catalog/model/product.php
add p.shipping to the query on line 14

$query = $this->db->query("SELECT DISTINCT *, p.shipping AS shipping_applicable, pd.name AS name, [...]

after you need to assign the result in the (in construction array)
ex;
[...]
'viewed' => $query->row['viewed'],
'shipping_applicable' => $query->row['shipping_applicable'] // you can choose the name you want
[...]

now locate : catalog/controller/product/product.php

and add this

$this->data['text_free_shipping'] = $this->language->get('text_free_shipping');

Add the text in respective language files
ex: $_['text_free_shipping'] = 'Livraison gratuite!';
-----------------------
Finally modify you template to show the new vars
/view/theme/template/product/product.tpl

this is what I did, you can decide to place it anywhere you want
<?php if($shipping_applicable == 0){ ?><span class="free_shipping"><?php echo $text_free_shipping; ?></span></div><?php } ?>

edit your stylesheel to style your <span> by adding a class
.free_shipping {
color: #FFFFFF;

}


Posts

Joined
Wed Jan 09, 2013 9:44 am

Post by thegeekz » Thu Aug 21, 2014 12:26 pm

Digging up old thread as I think I may need this for my cart and my friend's cart.. Using OC 1.5.6.+

Sebastienpilon: possible to show the screenshot here of how your modding below ---- the results in the cart?


Also as I understand this is for free shipping for certain products that has the free shipping enabled in product page, what if customer orders this item and another item that is not eligible for free shipping?

Will the shipping fee be still charged for the other item?


If my friend requires that since customer ordered both, free shipping will apply to both instead of having to charge the shipping fee for the non-eligible item?

Thank you.

sebastienpilon wrote:This is what I did and it works just fine. (opencart Version 1.5.4)

First of all, you'll need to modify the query who fetch the datas in the product page because no shipping field is returned from the mysql request . As you probably have seen, their is a radio button "Shipping required"
in catalog/model/product.php
add p.shipping to the query on line 14

$query = $this->db->query("SELECT DISTINCT *, p.shipping AS shipping_applicable, pd.name AS name, [...]

after you need to assign the result in the (in construction array)
ex;
[...]
'viewed' => $query->row['viewed'],
'shipping_applicable' => $query->row['shipping_applicable'] // you can choose the name you want
[...]

now locate : catalog/controller/product/product.php

and add this

$this->data['text_free_shipping'] = $this->language->get('text_free_shipping');

Add the text in respective language files
ex: $_['text_free_shipping'] = 'Livraison gratuite!';
-----------------------
Finally modify you template to show the new vars
/view/theme/template/product/product.tpl

this is what I did, you can decide to place it anywhere you want
<?php if($shipping_applicable == 0){ ?><span class="free_shipping"><?php echo $text_free_shipping; ?></span></div><?php } ?>

edit your stylesheel to style your <span> by adding a class
.free_shipping {
color: #FFFFFF;

}

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by Nikolauz » Mon Jun 29, 2015 4:04 pm

For the weight based solution: in case you can assign a specific unique weight to each product, the ones that you'd like to have a selective free shipping for, just assign $0 shipping cost to that specific weight amount in the admin shipping and then add this line to function getQuote() in catalog/model/shipping/weight.php:

Find:

Code: Select all

$weight = $this->cart->getWeight();
Insert:

Code: Select all

if($weight>140) $weight=$weight-140;
as the next line (assuming that your specific weight was 140), and so for all the unique weights should there be more.

This will work correctly with any combination of your free shipping product with any other product via the weight based shipping option, as well as if it's just the free product in the cart. Weight amount in the shopping cart will be the correct one. You may want to remove the weight amount in the popup modal, however, as there the "140" amount will be subtracted and the total therefore will not correspond to the real weight.

For this, find this in template/chackout/shipping.tpl (in my system, which is 2.0.2.0)

Code: Select all

html += json['shipping_method'][i]['quote'][j]['title'] + ' - ' + json['shipping_method'][i]['quote'][j]['text'] + '</label></div>';
and remove

Code: Select all

['quote'][j]
which will result into

Code: Select all

html += json['shipping_method'][i]['title'] + ' - ' + json['shipping_method'][i]['quote'][j]['text'] + '</label></div>';
You may also find some more elegant solution for this last one.

P.S. Perhaps there are better solutions in form of extensions or else out there, I just dun't know. It's kinda overdue, isn't? We are already at 2.0.

Newbie

Posts

Joined
Mon Jun 29, 2015 3:33 pm
Who is online

Users browsing this forum: No registered users and 21 guests