Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Table shipping not long enough


Guest

Recommended Posts

Hey all,

 

Just getting my hands dirty with osCommerce and I had a question about the weight tables. We carry allot of different items all with different weights. I'm trying to find the easiest solution for calculating the shipping. I would prefer to stay away from 3rd party calculators (FedEx, UPS, etc.) unless it's absolutely necessary.

 

We just quit using Channel Advisor and I'm looking for something equivalent to what they use. In OSC, there is only 1 row with a max of 255 chars, and they are separated by commas. On CA's site, there are many rows with "a rule" on each row and the ability to add more so that it's virtually unlimited.

 

Here's an example of the rule I made for OSC that was too long:

 

10:14.99,20:19.99,30:29.99,40:39.99,50:49.99,60:54.99,70:54.99,80:54.99,90:59.99

,100:59.99,-snip

110:64.99,120:69.99,130:74.99,140:79.99,150:84.99,160:94.99,170:99.99,180:104.99

,190:109.99,200:114.99,-snip

210:119.99,220:124.99,230:134.99,240:139.99,250:144.99,260:149.99,270:154.99,280

:164.99,290:169.99,300:179.99,-snip

310:184.99,320:189.99,330:194.99,340:199.99,350:204.99,360:209.99,370:219.99,380

:224.99,390:229.99,400:234.99,-snip

410:239.99,420:244.99,430:249.99,440:254.99,450:264.99,460:269.99,470:274.99,480

:279.99,490:279.99,500:284.99,-snip

510:289.99,520:294.99,530:299.99,540:309.99,550:314.99,560:319.99,570:324.99,580

:329.99,590:334.99,600:339.99,-snip

610:344.99,620:349.99,630:354.99,640:364.99,650:369.99,660:379.99,670:379.99,680

:384.99,690:389.99,700:394.99

 

On CA's site, it was more like:

 

10:14.99

20:19.99

30:29.99

40:39.99

etc.

Add another row

 

If anyone could give me a hand I would greatly appreciate it.

 

TIA

Link to comment
Share on other sites

SOLVED! But hacked :P

 

I just put this in the top of the file:

 

define('MODULE_SHIPPING_TABLE_CUSTOM_COST', '0:0.00,10:14.99,20:19.99,30:29.99,40:39.99,50:49.99,60:54.99,70:54.99,80:54.

99,90:59.99,100:59.99'); //sniped for forum

 

Then I changed:

 

$table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST);

 

to:

 

$table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_CUSTOM_COST);

 

So that way it reads it from the file instead of the database. The only other thing I saw was modifying the database table that holds the original information and change it to LONGTEXT. But I read to many posts about this slowing down the database substationally to go that route.

Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...