Zen Cart Logo
Forums / Addon Order Total Modules / help with changing a few things?

help with changing a few things?

Views: 9,328

Results 21 to 32 of 32
4 Feb 2026, 8:48 AM
#21
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

help with changing a few things?

The new version of the module on dbltoe GitHub has a problem with some SQL query.
Replace lines 119 to 122:

        $result = $db->Execute($sql, [
            ':zoneId'    => $zoneId,
            ':countryId' => $countryId,
        ]);

By this:

        $sql = $db->bindVars($sql, ':zoneId', $zoneId, 'integer');
        $sql = $db->bindVars($sql, ':countryId', $countryId, 'integer');
        $result = $db->Execute($sql);

It should work but you still need to modify it to do what you want.

4 Feb 2026, 9:46 AM
#22
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

Re: help with changing a few things?

There is a similar module , 'Shipping Surcharge' here if it can give you some ideas...

4 Feb 2026, 1:05 PM
#23
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: help with changing a few things?

added modified code and it works for all but not for the added manufacturers or categories.

4 Feb 2026, 2:19 PM
#24
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

Re: help with changing a few things?

Ah, yes, there are 2 similar corrections to be done.
Around line 188, replace:

            $manResult = $db->Execute($manSql, [':productId' => $productId]);

By this:

            $manSql =  $db->bindVars($manSql, ':productId', $productId, 'integer');;
            $manResult = $db->Execute($manSql, 1);

Then around what should now be line 202, replace :

                $catResult = $db->Execute($catSql, [':productId' => $productId]);

By this:

                $catSql =  $db->bindVars($catSql, ':productId', $productId, 'integer');;
                $catResult = $db->Execute($catSql, 1);

All should be fine now.

5 Feb 2026, 12:28 AM
#25
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: help with changing a few things?

yes thank you, how can i add the ability to add a charge per manufacturer or category, ex. i put manufacturer id like this 129, 25 and want to put extra fee like14%,8% 14%(is id 129),8%(is id 25)

5 Feb 2026, 12:31 AM
#26
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: help with changing a few things?

and is there away to only apply to those items from said manufacturer or category to only charge on those items in the cart, in other words not to add a percent to anything else in the cart not from those categories or manufacturer?

5 Feb 2026, 8:45 AM
#27
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

Re: help with changing a few things?

jimmie:

yes thank you, how can i add the ability to add a charge per manufacturer or category, ex. i put manufacturer id like this 129, 25 and want to put extra fee like14%,8% 14%(is id 129),8%(is id 25)

If you have only two rates, then you can clone this module and set one for manufacturer 129 at 14% and the other for category 25 at 8%.

If there are many possible rates, the module code needs to be rewrite...

5 Feb 2026, 8:51 AM
#28
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
395
Plugin Contributions:
6

Re: help with changing a few things?

jimmie:

and is there away to only apply to those items from said manufacturer or category to only charge on those items in the cart, in other words not to add a percent to anything else in the cart not from those categories or manufacturer?

Not with this module, it is an Order Total modules. To do what you want, you would have to work at the product level, like using different tax rates or perhaps attributes.

5 Feb 2026, 12:49 PM
#29
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: help with changing a few things?

I've applied the changes on GitHub.

Could you verify the correctness when you have a chance?

THANX

5 Feb 2026, 1:12 PM
#30
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: help with changing a few things?

dbltoe:

I've applied the changes on GitHub.

Could you verify the correctness when you have a chance?

THANX

yes everything is working,just need to apply to multiple extra fee price per manufacturer

6 Feb 2026, 9:27 PM
#31
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: help with changing a few things?

I think you may like the 2.1.0 release located at https://github.com/dbltoe/extraorderfee/releases/tag/extraorderfee2.1.0

I have not actually entered data on a test site due to time constraints.

If you can test it, I'd appreciate it.

It removes the flat fee and allows settings by Manufacturer, Category, and/or Product ID.

6 Feb 2026, 10:06 PM
#32
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: help with changing a few things?

crud, found an error.