How can i added related products in OPC 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

How can i added related products in OPC in cart?

Postby starac012_1@.....ru » Sun Apr 21, 2019 2:27 pm

Hello, how can i add to show related products in cart, when i use one page checkout?
starac012_1@.....ru
 
Posts: 1
Joined: Sun Apr 21, 2019 2:25 pm

Re: How can i added related products in OPC in cart?

Postby admin » Mon May 20, 2019 1:26 pm

hello, it would need to be done programatically or by using a custom module.

if you already got a module that can detect product IDs in the cart and load their related product's IDs you can install OPC positions + make the module to be displayed under the cart + make sure it does not break OPC form.

generally:
- you need to collect the related product IDs which are mostly stored in product custom fields table (note that this is the slowest table in whole virtuemart and a query to this table can kill performance of whole your site and slow down the checkout, so if there is 20 products in the cart and they also got parent products, it can take many tens of seconds to load all of their related products)
- once you have the IDs you can copy code from "mod_virtuemart_product" module into OPC's basket.html.php OR onepage.unlogged.tpl.php depending where you want to show it
- if using "ajax cart" (when whole OPC is wrapped in a single from) you must make sure that any related product is loaded without form tags

if needed we can arrange some time for custom works in this matter if you know exactly what you want.

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