Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping!


Guest

Recommended Posts

Posted

I want to only have two options available for shipping, 24 hr @ ?8.95 and 48 hr @ ? 5.95.

I cant see how to do this in oscommerce. any tips ??

Tjobbe

Posted

You might try this.

 

Enable both Flat Rate and Per Item shipping and disable all others. Set the cost in one to your 24 hour rate and the cost in the other to your 48 hour rate. You can locate the files in your language folder and change the description that the customer sees to what you want.

 

I have done something similar for "Free Shipping" and "Freight- We will call you with a quote" and it seems to work OK. Of course, the customer can choose only one of the two for a given order (thus, I have to have people create separate orders if one item falls into one of these two categories and other items don't) but it sounds like that may not be an issue in your situation.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

DOH! :oops:

 

I just realized that the per item won't work this way if your customer has more than one item.

 

So maybe try it with Flat Rate and Store Pickup, that might do the trick.

 

:?

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

Thanks for the reply.

 

You said store pickup. I dont have that option in admin>shipping modules.

i have osc 2.2 ms1.

 

I have got, however,

flat rate

table rate

per item

ups

usps

zone rates

Posted

OK, you might be able to accomplish it with zone rate or table rate by just creating one zone to cover all areas or one table entry that covers all areas and weights (I suspect the zone one might be easier)

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

I'd make 2 copies of flat rate, and name one 24.php, the other 48.php - you'll need to amend a little bit of PHP in them.

 

Sorted! Easy.

Posted

Or you could do it the easy way and do it like Burt said (why didn't I think of that?)

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

Wehre do i find flat rate? is it named flatrate.php? or is it a different file?

How do i copy it if it isnt a file?

 

questions, questions.

Posted

Try

 

shop/includes/modules/shipping/flat.php

 

It should pretty much work OK, you may need to mess about with the language defines and you will definately need to change line 13:

 

class flat() {

 

to

 

class 24() {

 

etc etc.

 

hth

Posted

catalog/includes/modules/shipping/flat.php

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

Warning: main(/home/www/hosts/www.bagnboxman.co.uk/shop/includes/languages/english/modules/shipping/24.php) [function.main]: failed to create stream: No such file or directory in /home/www/bagnboxm/shop/admin/modules.php on line 120



Warning: main() [function.main]: Failed opening '/home/www/hosts/www.bagnboxman.co.uk/shop/includes/languages/english/modules/shipping/24.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/bagnboxm/shop/admin/modules.php on line 120



Parse error: parse error, unexpected T_LNUMBER, expecting T_STRING in /home/www/bagnboxm/shop/includes/modules/shipping/24.php on line 13



Warning: main(/home/www/hosts/www.bagnboxman.co.uk/shop/includes/languages/english/modules/shipping/48.php) [function.main]: failed to create stream: No such file or directory in /home/www/bagnboxm/shop/admin/modules.php on line 120



Warning: main() [function.main]: Failed opening '/home/www/hosts/www.bagnboxman.co.uk/shop/includes/languages/english/modules/shipping/48.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/bagnboxm/shop/admin/modules.php on line 120



Parse error: parse error, unexpected T_LNUMBER, expecting T_STRING in /home/www/bagnboxm/shop/includes/modules/shipping/48.php on line 13

 

which means what exactly?

 

I had a look at line 120 on modules.php and it says this:

 

    include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/' . $module_type . '/' . $file);

Posted

i have now fixed the errors on line 13 but the 4 error messages on line 120 of modules.php still stands.

 

Any ideas anyone?

 

heres some sample code form pf24.php (i had named it to 24.php and chnaged line 13 etc to 24 but it didnt seem to like it untill i changed it to have a letter as well!)

 

  class PF_24 {

   var $code, $title, $description, $icon, $enabled;



// class constructor

   function PF_24() {

     global $order;



     $this->code = 'PF_24';

     $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;

     $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;

Posted

You need to add in the necessary language files also.

 

shopincludeslanguagesenglishmodulesshipping<name_of_your_file>.php

 

In effect copy flat.php twice and name the copies the same name as your files you made earlier...

 

hth

Posted

Like you said on line 13 there is "flat" which I would change acordingly. no problem.

 

However, lower down the page, it has flat again but in caps, like this: "MODULE_SHIPPING_FLAT_COST"

 

Do i need to change the caps as well throughout the page?

Posted

Yes! If your file is called flat24.php then do a case sensitive search and replace i.e. replace all instances of "flat" with "flat24" and all instances of "FLAT" with "FLAT24". Same in your corresponding language file. I think that should work...

tobz

 

osCommerce Links

osCommerce Templates

osCommerce UK <-- This site is for sale!

Posted

Didnt work!

 

I changed everything like you said, but I got this error and only "flat rate" and "pr itme" showed up!

 

Fatal error: Cannot redeclare class parcelforce24 in /home/www/bagnboxm/shop/includes/modules/shipping/parcelforce24.php on line 13

 

I know that line 13 isnt wrong. bcoz parcelforce48 is written the same.

 

I then deleted parcelforce24.php and I got the same error for parcel force48...

 

Any ideas anyone?

Posted

Try starting over again with the original, unaltered, version of flat.php and make sure you change every instance of "FLAT" and "flat" to their respective values depending on which file you are creating. The case sensitive search-replace method I described does work, honest :)

tobz

 

osCommerce Links

osCommerce Templates

osCommerce UK <-- This site is for sale!

Posted

I don't mean to be thick or anything mate, but I have done like you just said 3-4 times, and I've double checked etc.

 

Is there any chance that you would be able to have a go for me? you would be rewarded in silver of course...

 

tjobbe

  • 3 weeks later...
Posted
Try

 

shop/includes/modules/shipping/flat.php

 

It should pretty much work OK, you may need to mess about with the language defines and you will definately need to change line 13:

 

class flat() {

 

to

 

class 24() {

 

etc etc.

 

hth

 

I tried this to get flat rate for UPS (changing all the flat to something else) and it would only work is the original flat.php was enabled and even then no matter what I selected, it used the shipping figures from the flat.php module.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Posted
heres some sample code form pf24.php (i had named it to 24.php and chnaged line 13 etc to 24 but it didnt seem to like it untill i changed it to have a letter as well!)

 

Get rid of the underscore and the 24 in the filename and values in the file.

 

try pftwentyfour.php and pftwentyfour in place of the variable components you used ie if you started with flat.php FLAT becomes PFTWENTYFOUR and flat becomes pftwentyfour

Posted

I hit memory errors and got all those ... just cleaning up the mess now. 8)

Posted

3333

 

is there something symbolic about that :o

 

nice to see you back 8)

Archived

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

×
×
  • Create New...