Page 1 of 1

[J4/VM4/OPC435] Shipment/payment cost not added in cart

PostPosted: Wed May 31, 2023 12:32 pm
by mrwimpy@.....com
Hey hey,

On my localhost I have updated a J3/VM4 shop to J4. So far everything looks good; 1 issue remains.

The shipping/payment cost is not displayed or added to the total price in the cart.

The cost is added on the order/invoice. So it is there.

The Joomla update check did mention that OPC could cause issues, so I disabled all the marked plugins and enabled them after the update was complete.

I have tried with Cassiopeia and with different OPC themes.
I have tried selecting different Shipping/Payment methods.
I have tried (re-)installing OPC over the existing OPC.

J4.3.1/4.3.2
VM 4.0.12
OPC 2.0.433/2.0.35

Inside the console I see the following errors on the cart page (translated from Dutch):
Code: Select all
Blocked GET http://localhost:8888/shop4/cache/com_onepage/opc_dynamic_nl-NL_87350a73e911f69c700c71849abbc816.js?opcver=2Z0Z435Z220523
(500 Internal server error)

Code: Select all
The source of ‘http://localhost:8888/shop4/cache/com_onepage/opc_dynamic_nl-NL_1af0f38d4d0e192e39194fece76c83c1.js?opcver=2Z0Z435Z220523’ is blocked because of a non-conforming MIME-type (‘text/html’) (X-Content-Type-Options: nosniff).

Code: Select all
Uncaught ReferenceError: custom_rendering_fields is not defined <anonymous>


And the following warnings (translated from Dutch):
2 warnings about Cookies and SameSite

Code: Select all
unreachable code after return statement

Code: Select all
Loading <script> with source ‘http://localhost:8888/shop4/cache/com_onepage/opc_dynamic_nl-NL_87350a73e911f69c700c71849abbc816.js?opcver=2Z0Z435Z220523’ has failed.


Layout was forced before the page was fully loaded.


If you need more info let me know.
Regards,
Wim

Re: [J4/VM4/OPC435] Shipment/payment cost not added in cart

PostPosted: Fri Jun 23, 2023 12:11 pm
by admin
Hello, when you get an error from loading generated JS files from cache directory you might:
- contact "admin tools" developer and explain him that cache directory is a good place for generated JS files
- disable protection of the cache directory so that generated JS files can be used (either remove .htaccess from there or reconfigure admin tools)
- in OPC you might want to change "Generate OPC config javascript file" to "not checked" so that JS is inlined and thus won't cause the problem
- switch to RS Firewall which seems to be more effective compared to "admin tools" and doesn't cause such issues in long term + ask your hosting to enable mod_security

best regards, stan

Re: [J4/VM4/OPC435] Shipment/payment cost not added in cart

PostPosted: Wed Jun 28, 2023 3:24 pm
by mrwimpy@.....com
admin wrote:- in OPC you might want to change "Generate OPC config javascript file" to "not checked" so that JS is inlined and thus won't cause the problem

Thank you, this was the solution.

The other options don't apply to my site.
I think I can now start to prepair to upgrade to J4 on my live site.

Regards,
Wim

Re: [J4/VM4/OPC435] Shipment/payment cost not added in cart

PostPosted: Tue Oct 24, 2023 12:46 pm
by admin
hello, this issue is usually caused by "admin tools" blocking cache directory (with htaccess). we prefer RS Firewall and mod_security for better site's protection.

best regards, stan