Jump to content



Latest News: (loading..)

- - - - -

USPS and a free shipping contribution


This topic has been archived. This means that you cannot reply to this topic.
20 replies to this topic

#1   jhande

jhande
  • Members
  • 2,112 posts

Posted 24 March 2012 - 12:45 AM

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

Edited by jhande, 24 March 2012 - 12:47 AM.

- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#2   Monika in Germany

Monika in Germany
  • Members
  • 4,901 posts

Posted 26 March 2012 - 09:04 AM

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 ...

#3   burt

burt

    Code Monkey

  • Community Team
  • 7,759 posts

Posted 26 March 2012 - 10:36 AM

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).

Edited by burt, 26 March 2012 - 10:37 AM.

Dummies guide to designing osCommerce 2.3 Click Me

Or maybe a ready made theme for your shop ??

Warning: My posts may contain Horsemeat.

#4   Monika in Germany

Monika in Germany
  • Members
  • 4,901 posts

Posted 26 March 2012 - 02:24 PM

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 ...

#5   jhande

jhande
  • Members
  • 2,112 posts

Posted 26 March 2012 - 10:36 PM

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 & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#6   burt

burt

    Code Monkey

  • Community Team
  • 7,759 posts

Posted 28 March 2012 - 01:43 PM

http://forums.oscommerce.com/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.
Dummies guide to designing osCommerce 2.3 Click Me

Or maybe a ready made theme for your shop ??

Warning: My posts may contain Horsemeat.

#7   ndamico

ndamico
  • Members
  • 40 posts

Posted 31 March 2012 - 04:48 PM

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.

#8   jhande

jhande
  • Members
  • 2,112 posts

Posted 04 April 2012 - 06:36 PM

View Postburt, on 28 March 2012 - 01:43 PM, said:

http://forums.oscommerce.com/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 & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#9   fulluvscents

fulluvscents
  • Members
  • 305 posts

Posted 11 April 2012 - 05:22 AM

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.

#10   jhande

jhande
  • Members
  • 2,112 posts

Posted 12 April 2012 - 09:15 AM

Thank you Jetta, I'll check it out!


- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#11   ndamico

ndamico
  • Members
  • 40 posts

Posted 12 April 2012 - 04:18 PM

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


View Postfulluvscents, on 11 April 2012 - 05:22 AM, said:

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.


#12   ndamico

ndamico
  • Members
  • 40 posts

Posted 12 April 2012 - 04:22 PM

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!

#13   fulluvscents

fulluvscents
  • Members
  • 305 posts

Posted 12 April 2012 - 07:45 PM

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.

#14   ndamico

ndamico
  • Members
  • 40 posts

Posted 12 April 2012 - 09:51 PM

i'll give it a shot this evening.  thanks again.

#15   ndamico

ndamico
  • Members
  • 40 posts

Posted 13 April 2012 - 02:02 AM

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]


#16   ndamico

ndamico
  • Members
  • 40 posts

Posted 13 April 2012 - 02:16 AM

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.

#17   ndamico

ndamico
  • Members
  • 40 posts

Posted 13 April 2012 - 02:45 AM

i checked the database and checking the box is changing the "products_ships_free" field to 1 in the record.

#18   ndamico

ndamico
  • Members
  • 40 posts

Posted 13 April 2012 - 02:54 AM

well now it works but i have to edit the db manually at the state of the check box when editing the item doesn't function.

#19   fulluvscents

fulluvscents
  • Members
  • 305 posts

Posted 14 April 2012 - 12:20 AM

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.

Edited by fulluvscents, 14 April 2012 - 12:21 AM.


#20   ndamico

ndamico
  • Members
  • 40 posts

Posted 14 April 2012 - 01:42 AM

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