If this is your first visit, check our documentation. To post, register or login.
Forums / Built-in Shipping and Payment Modules / Can I duplicate the Table Rate module?

Can I duplicate the Table Rate module?

Started by squaredorito on 5 Mar 2013, 7:14 PM · Views: 1,684

Results 1 to 11 of 11
5 Mar 2013, 7:14 PM
#1
squaredorito avatar

squaredorito

New Zenner

Join Date:
Feb 2013
Posts:
11
Plugin Contributions:
0

Can I duplicate the Table Rate module?

I tried making a table2 and copying changing all the tables in the code to table2 and TABLE2, but it didn't work. This worked with the Flat Rate shipping module. Is there a reason I can't do this with the Table Rate? When I try it the modules below it don't show up in Zen Cart and I won't let me configure the ones that do show up

5 Mar 2013, 7:16 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I duplicate the Table Rate module?

You have to be careful in the Table Rate table code as the word TABLE also refers to database tables and not every instance gets changed ...

You might peek at this Add On for Table Rate Clones I think this is the one that I made cloning Table Rate table shipping module:
http://www.zen-cart.com/downloads.php?do=file&id=720

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Mar 2013, 7:24 PM
#3
squaredorito avatar

squaredorito

New Zenner

Join Date:
Feb 2013
Posts:
11
Plugin Contributions:
0

Re: Can I duplicate the Table Rate module?

Awesome! Thanks a lot, got the second Table Rate I needed.

5 Mar 2013, 7:27 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I duplicate the Table Rate module?

You are most welcome ... thanks for the update that this worked for you ... :smile:

You might use something like Beyond Compare from scootersoftware.com and see where you went astray with your file compared to the cloned copies ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

5 Mar 2013, 11:57 PM
#5
squaredorito avatar

squaredorito

New Zenner

Join Date:
Feb 2013
Posts:
11
Plugin Contributions:
0

Re: Can I duplicate the Table Rate module?

Thanks! Much appreciated, I'll check that out

26 Jun 2013, 8:22 AM
#6
znlambov avatar

znlambov

New Zenner

Join Date:
Jan 2010
Location:
Bulgaria
Posts:
25
Plugin Contributions:
0

Re: Can I duplicate the Table Rate module?

Hi fellows,
I'd like to know, is Table Rate Clone from 7 Jul 2012 working with ZenCart v1.5.1?

Best regards, Zi.:thumbsup:

Droga.bg - powerd by ZenCart

26 Jun 2013, 2:06 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I duplicate the Table Rate module?

That should work fine with v1.5.1 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Jul 2013, 8:47 AM
#8
znlambov avatar

znlambov

New Zenner

Join Date:
Jan 2010
Location:
Bulgaria
Posts:
25
Plugin Contributions:
0

Re: Can I duplicate the Table Rate module?

Hello again,

Is it possible to tweak/modify the table rate module, and to set the shipping cost to be based on Weight AND % of the Price.
The reason is that the courier companys are charging weight and Cash on Delivery tax. Here in Bulgaria we usually use Cash on Delivery peyments, the online payments are not really popular yet.

Sorry if the question is irrelevant for this topic. :unsure:

Regards, Zi. :smile:

Droga.bg - powerd by ZenCart

1 Jul 2013, 2:11 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I duplicate the Table Rate module?

That can be done by editing the shipping module:
/includes/modules/shipping/table.php

and adding the code in RED, for example to add 10% of the total, to the shipping cost:

[B]// bof: percentage cost
    $order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices();
    $extra_cost = round($order_total * .10,2);
//echo '$shipping ' . $shipping . ' $extra_cost: ' . $extra_cost . ' = ' . round($shipping + $extra_cost,2) . '<br>';
[/B]    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $shipping[B] + $extra_cost[/B] + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
[B]// eof: percentage cost
[/B]

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

3 Jul 2013, 1:31 PM
#10
znlambov avatar

znlambov

New Zenner

Join Date:
Jan 2010
Location:
Bulgaria
Posts:
25
Plugin Contributions:
0

Re: Can I duplicate the Table Rate module?

Thanks a lot Ajeh,

The code is working :happy: . One more thing, how can I change the percent value?:lookaroun

    $extra_cost = round($order_total * .10,2);

I tried to replace th digits 10 but I don't think this is the correct way.

Droga.bg - powerd by ZenCart

3 Jul 2013, 1:41 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I duplicate the Table Rate module?

The .10 is adding 10% ... change it to how much you want added ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!