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

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

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

Postby mrwimpy@.....com » Wed May 31, 2023 12:32 pm

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
mrwimpy@.....com
 
Posts: 14
Joined: Thu Aug 13, 2015 11:23 am

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

Postby admin » Fri Jun 23, 2023 12:11 pm

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
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

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

Postby mrwimpy@.....com » Wed Jun 28, 2023 3:24 pm

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
mrwimpy@.....com
 
Posts: 14
Joined: Thu Aug 13, 2015 11:23 am

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

Postby admin » Tue Oct 24, 2023 12:46 pm

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
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron