Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS and a free shipping contribution


jhande

Recommended Posts

I am getting ready to make the jump to osC 2.3.1 and I'm looking for different contributions to add.

 

What I am hoping to do is offer free shipping on a lot of products (probably per categories).

 

How I would "like" the shipping scenario to work =

 

Cart = all free shipping products... Free only option.

Cart = pay for shipping... USPS options.

Cart = both pay for & free = add up "all" weights... USPS options.

 

Not sure if this is even possible???

 

After searching these to contributions stand out:

 

Show Free Ship + Modules v1.2 by fulluvscents 31 Jan 2012

http://addons.oscommerce.com/info/8328/v,23

 

Individual Product Shipping Prices (which version?)

http://addons.oscommerce.com/info/1333

 

Has anyone had experience with either of these?

Would any of them serve my purpose?

 

Any recommendations would be greatly appreciated.

 

Oops, forgot... I'll be using PayPal

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

well ... if we call your 3 options A,B and C then B & C are basically the same, right? You have at least 1 item in the cart that has a weight ... and in A all items are weightless I suppose?

 

I wouldn't use a contribution.

 

You can check your cart weight and if it's > 0, disable the flat fee module that you have set to a fee of 0.

If it's 0, disable your usps module.

 

If you plan to change the weight of your items to 0 per category, you may need some kind of mass updating tool. But even for this, a big addon with a tool may be much too much, when you basically only need a button in the cat section that is called "set weight to 0" and executes a simple sql. More elegantly (if it's tons of items), you could save the current weight in an extra field in the products table and have a second button, that says "restore to real weight" ;-)

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I'd do it slightly differently;

 

Have an extra radio button in each product (like the products status), this would be for "free shipping" 0 or "chargable shipping" 1. Now amend the shopping_cart class to add up the total of all the 1's (that is products on which shipping should be charged). If the total of that count is zero, then you know that the shipping has to be free. If it is greater than zero, you know that the shipping has to be chargable.

 

Once you have that "0" or "more than 0" count, do as Monika says and enable/disable shipping methods appropriately.

 

This approach takes the logic away from using weights to do it (which might or might not be more suitable).

Link to comment
Share on other sites

I thought about suggesting that also burt ...

 

Given that Jim normally prefers contributions, I wanted to use as few new fields as possible ... Let's see how he solves it! There are always a gazillions roads to Rome ;-)

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Thanks Monika and Burt for your suggestions.

 

How have you been Monika...? It's been awhile.

 

Let me see if I understand correctly...

In a vanilla osC 2.3.1 installation if a product has a zero weight, I still have to disable the USPS module as it will still try to charge shipping?

 

I haven't unzipped and installed 2.3.1 just yet, still cleaning up my files and folders from my 2.2.

 

In what file would I edit to disable the USPS module? :blush:

 

You are correct Monika, I prefer contributions/add-ons if available but don't mind trying my hand at basic coding. I have done some without too many resulting problems in the past. :-

 

I already have an SQL querry I can adapt to change all the exsisting weights. It was setup for changing the price in certain categories.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

I hope progress is made on this. in my pre-2.3.1 store i used the free-shipping-by-cats mod which wasn't terribly flexible but it worked. i've tried without luck to get it to work in 2.3.1 so at this point i'll take anything.

Link to comment
Share on other sites

http://www.oscommerce.com/forums/topic/376356-free-shipping-on-certain-products/page__view__findpost__p__1588074

 

I said almost the same thing last year! A bit more detail in that one for you to chew on.

 

Thanks a lot burt!

 

Will have a go at it once my PC comes back from the shop...

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Hi,

 

OSC 2.3.1

 

i have installed this and ran the sql script. it added the "products_ship_free" column to the products table. i made all the file changes. i removed the shipping module from modules/order total and added it back in. i configured the module and set "allow free shipping by product" to true.

 

The problem is that when i go to actually edit a product (and enable free shipping), there is no free shipping option. my store seems to work as it did before (nothing broke) but no free shipping.

 

any suggestions?

 

thank you

 

 

Try this: http://addons.oscommerce.com/info/8409 It'll work with PayPal standard, but is not set up to work with PayPal express. The express checkout could be modified similar to the checkout_shipping file however, to make it work.
Link to comment
Share on other sites

update - i manually changed one item's "products_Ship_free" to 1. i then added it to the cart and went to checkout. it still shows the standard shipping charge for the item. i thought perhaps the module was working just not allowing me to edit items through admin interface. its not working at all.

 

thank you for your help!

Link to comment
Share on other sites

I missed a couple lines in the code when I transferred it from my working files. I uploaded an update when I caught it. Try that.

Link to comment
Share on other sites

well i installed the updates and now i get this when i try and edit an item. i did remove the shipping module and add it back in again.

 

1054 - Unknown column 'p.products_usps_restricted' in 'field list'
select pd.products_name, pd.products_description, pd.products_url, p.products_usps_restricted, p.products_ship_free, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '62' and p.products_id = pd.products_id and pd.language_id = '1'
[TEP STOP]

Link to comment
Share on other sites

btw - i don't use any USPS shipping. I only use fedex.

 

i tried omitting the following step:

 

Find:
  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
Replace with:
// RESTRICT USPS METHODS START
//	  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_usps_restricted, p.products_ship_free, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
// RESTRICT USPS METHODS END

 

 

it allowed me to edit an item and see the "ship this product free" box. however when i check the box, save the item, then go back and edit the item the box is no longer checked.

Link to comment
Share on other sites

Mix up. This was added to a site that had the USPS restrictions in it (which also modifies the same line), and I didn't catch it.

 

Replace with:
// RESTRICT USPS METHODS START
//		$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
	  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_ship_free, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
// PRODUCTS SHIP FREE END

 

BTW, thanks for the feedback. I'd hate to see those simple errors go untended to.

Link to comment
Share on other sites

thank you for taking the time to help! btw did you happen to fix the check box not showing the current state when you are editing an item? i had that bite me already when i flagged an item as free and it really wasn't. when i went to look at the item from oscadmin it didn't have the box checked but when i looked it the DB it was set to 1.

 

just to clarify- with the above text you said that was added in error---- i just removed it. was that correct? or do i need to replace it with something else?

 

thanks again

Link to comment
Share on other sites

hi,

 

first of all this mod works great with paypal and wepay. THANK YOU SOOO MUCH. i setup google checkout last night and it doesn't work. the discount doesn't come across. is there any way to make it happen?

 

this is the GC mod i'm using:

 

http://www.oscommerce.com/forums/topic/272825-offical-google-checkout-module-for-oscommerce-support-thread/page__st__1180

 

 

 

Try this:

 

http://addons.oscommerce.com/info/8409

 

It'll work with PayPal standard, but is not set up to work with PayPal express. The express checkout could be modified similar to the checkout_shipping file however, to make it work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...