Zen Cart Logo
Forums / General Questions / Help regarding Encapsulated Plugins Mod for zc158

Help regarding Encapsulated Plugins Mod for zc158

Views: 452

Results 1 to 5 of 5
18 Mar 2025, 1:54 PM
#1
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
365
Plugin Contributions:
0

Help regarding Encapsulated Plugins Mod for zc158

Greetings.

I noticed that local sales tax was updated by @lat9, but it is only in encapsulated plugin format for zc210+. My product site is zc158 so obviously it is not compatible.

I checked the links below to add proper support for encapsulated plugins. It is not easy because it seems the guide below is based on zc201 files, not zc158.

https://docs.zen-cart.com/dev/plugins/encapsulated_plugins/
https://gist.github.com/lat9/9deb64d3325081d18bb0db5534bcf142

Anyway, I have figured out how to modify/update all the files as mentioned above (no warning files generated), however, I have an issue for my local sales tax. In the checkout page, the proper tax amount was added to the total, but the line of local sales tax is not displayed near sub-total line. Only sub-total, shipping, and total. I checked all the mod files several times but I still cannot find out which file could be the issues. Any help would be appreciated.

Or maybe it will be easy to manually convert encapsulated plugin files back into regular files?

https://docs.zen-cart.com/dev/plugins/encapsulated_plugins/converting/

18 Mar 2025, 3:21 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Help regarding Encapsulated Plugins Mod for zc158

njcyx:

Greetings.

I noticed that local sales tax was updated by @lat9, but it is only in encapsulated plugin format for zc210+. My product site is zc158 so obviously it is not compatible.

I checked the links below to add proper support for encapsulated plugins. It is not easy because it seems the guide below is based on zc201 files, not zc158.

https://docs.zen-cart.com/dev/plugins/encapsulated_plugins/
https://gist.github.com/lat9/9deb64d3325081d18bb0db5534bcf142

Anyway, I have figured out how to modify/update all the files as mentioned above (no warning files generated), however, I have an issue for my local sales tax. In the checkout page, the proper tax amount was added to the total, but the line of local sales tax is not displayed near sub-total line. Only sub-total, shipping, and total. I checked all the mod files several times but I still cannot find out which file could be the issues. Any help would be appreciated.

Or maybe it will be easy to manually convert encapsulated plugin files back into regular files?

https://docs.zen-cart.com/dev/plugins/encapsulated_plugins/converting/
That version of the Local Sales Tax plugin doesn't have a separate order-total output. Its tax calculations are simply registered within the order's "Tax" and "Total" outputs.

18 Mar 2025, 3:28 PM
#3
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
365
Plugin Contributions:
0

Re: Help regarding Encapsulated Plugins Mod for zc158

Hi @lat9, thanks for your reply.

I see. But still, there is no tax line show up at the checkout page. Only three lines are displayed: sub-total, shipping and total.

The tax amount is indeed calculated correctly, which was added to the total amount.

18 Mar 2025, 4:05 PM
#4
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
365
Plugin Contributions:
0

Re: Help regarding Encapsulated Plugins Mod for zc158

Hi @lat9, thanks for your tip. I finally figured it out!

Under the order-total page, I have to enable both ot_tax and ot_local_sales_taxes. Then the checkout page will display as normal.

If I only enable ot_local_sales_taxes, no tax will be displayed.

I only use local sales tax, so it is empty under admin--locations/taxes--tax rates.

The previous version doesn't seem to work like this, but anyway it works now.

18 Mar 2025, 4:16 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Help regarding Encapsulated Plugins Mod for zc158

njcyx:

Hi @lat9, thanks for your tip. I finally figured it out!

Under the order-total page, I have to enable both ot_tax and ot_local_sales_taxes. Then the checkout page will display as normal.

If I only enable ot_local_sales_taxes, no tax will be displayed.

I only use local sales tax, so it is empty under admin--locations/taxes--tax rates.

The previous version doesn't seem to work like this, but anyway it works now.
Thanks for the post-back with the solution!