Automatic Related products under Virtuemart product page

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Mar 06, 2016 4:59 pm
Reply with quote
Report this post
Dear Support,

I would like to ask where can I add the following:
Under a Virtuemart Product page > Custom fields > Related Products I can choose the Related product, but it is a manual issue. Is it possible to make automatic somehow in order to avoid to setup every related product to every sigle product?
I didn't find any settings for it....
I mean: Is it possible to make automatic, where the related product automatically comes from its category?

Thank you,
Gergely
User avatar
Fresh Boarder

teitbite
Thu Mar 10, 2016 10:42 am
Reply with quote
Report this post
Hi

I'm afraid this question is strictly related with Virtuemart and not our products. You need to ask Virtuemart programmers for help here.
User avatar
Moderator

GK User
Fri Mar 11, 2016 12:53 pm
Reply with quote
Report this post
Dear teitbite,

Thanks. Just a question:
If found the following, so in this way theoretically we can include the module, but I don't know where to put in the GK template. Could you help me in this case?

1st: Add a module poition in the templete (OK, done)
https://www.gavick.com/documentation/jo ... e-position

2nd: Create aan "Other products you might be interested in" module for virtuemart where the module shows more products from the same category of the product the user is viewing.
Create a new module > Virtuemart Products module with the following details
http://www.metamodpro.com/forums/topic?id=1274

OK, done.

3rd: (there it comes the question)
http://forum.virtuemart.net/index.php?topic=103514.0

If add add this into the code, the whole site collapse:
<?php if (JRequest::getVar('view')=='productdetails') { ?>
<jdoc:include type="modules" name="productbycat<?php echo
JRequest::getInt('virtuemart_category_id',0); ?>" />
<?php } ?>

So where and how can i add a custom module under Product Details page?

Thank you very much,
Gergely
User avatar
Fresh Boarder

teitbite
Wed Mar 16, 2016 10:11 am
Reply with quote
Report this post
Hi

If You are talking about modifications to /html/com_virtuemart/productdetails/default.php than it's a component override. Way before the call for modules were done, so to add a module here You need to use a php code:

Code: Select all
      <?php
         $modules =& JModuleHelper::getModules('module_position_name_goes_here');
         foreach ($modules as $module) {
            echo JModuleHelper::renderModule($module);
         }
      ?>
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.