Virtuemart Product navigation

mladen.karlovcec
2 Posts
mladen.karlovcec posted this 31 May 2017

Hello,
i can not find how to enable product navigation for virtuemart.

On a Artister template the navigation is working, on the themler template it's not.

THEMLER

ARTISTER

Hello, i can not find how to enable product navigation for virtuemart. On a Artister template the navigation is working, on the themler template it's not. ![THEMLER][1] ![ARTISTER][2] [1]: https://i.imgur.com/UEWjR4Z.jpg [2]: https://i.imgur.com/a5O5GY5.jpg
Vote to pay developers attention to this features or issue.
10 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 31 May 2017

Hi,

Unfortunately Themler team does not provide such control. You can try adding this element manually using custom code in the CMS Code control.

Thank you,
Olivia

Hi, Unfortunately Themler team does not provide such control. You can try adding this element manually using custom code in the CMS Code control. Thank you, Olivia
Juan Padilla
7 Posts
Juan Padilla posted this 17 August 2017

Hi, what is the code that I should add and in what files?

Hi, what is the code that I should add and in what files?
César Mendoza
6 Posts
César Mendoza posted this 17 August 2017

Here I leave the code to do that ...
Just embed a CMS control in product details and that's it.

Here I leave the code to do that ... Just embed a CMS control in product details and that's it.

Last edited 17 August 2017 by César Mendoza

Juan Padilla
7 Posts
Juan Padilla posted this 17 August 2017

Gracias César, lo probaré

Gracias César, lo probaré
Juan Padilla
7 Posts
Juan Padilla posted this 17 August 2017

Lo probé pero no aparece, sólo aparace el espacio vacío. Alguna sugerencia?

Lo probé pero no aparece, sólo aparace el espacio vacío. Alguna sugerencia?
Juan Padilla
7 Posts
Juan Padilla posted this 17 August 2017

Lo intenté agregar en el archivo productoverview.php del template generado por themler, pero no funciona. Será otro el archivo que debo intervenir?

Lo intenté agregar en el archivo productoverview.php del template generado por themler, pero no funciona. Será otro el archivo que debo intervenir?
Juan Padilla
7 Posts
Juan Padilla posted this 18 August 2017

El archivo a modificar es default_template.php, ruta TEMPLATE/html/com_virtuemart/productdetails

El archivo a modificar es default_template.php, ruta TEMPLATE/html/com_virtuemart/productdetails
Support Team
Support Team posted this 29 August 2017

Hi,

Simply add "CMS Code" control to the Product Details template and insert the following code (from the VM source files):

<?php
    // Product Navigation
    if (VmConfig::get('product_navigation', 1)) {
    ?>
        <div class="product-neighbours">
        <?php
        if (!empty($this->product->neighbours ['previous'][0])) {
        $prev_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id, FALSE);
        echo JHtml::_('link', $prev_link, $this->product->neighbours ['previous'][0]
            ['product_name'], array('rel'=>'prev', 'class' => 'previous-page','data-dynamic-update' => '1'));
        }
        if (!empty($this->product->neighbours ['next'][0])) {
        $next_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id, FALSE);
        echo JHtml::_('link', $next_link, $this->product->neighbours ['next'][0] ['product_name'], array('rel'=>'next','class' => 'next-page','data-dynamic-update' => '1'));
        }
        ?>
        <div class="clear"></div>
        </div>
    <?php } // Product Navigation END
    ?>

That's all.

Thank you,
Olivia

Hi, Simply add "CMS Code" control to the Product Details template and insert the following code (from the VM source files): <?php // Product Navigation if (VmConfig::get('product_navigation', 1)) { ?> <div class="product-neighbours"> <?php if (!empty($this->product->neighbours ['previous'][0])) { $prev_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id, FALSE); echo JHtml::_('link', $prev_link, $this->product->neighbours ['previous'][0] ['product_name'], array('rel'=>'prev', 'class' => 'previous-page','data-dynamic-update' => '1')); } if (!empty($this->product->neighbours ['next'][0])) { $next_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id, FALSE); echo JHtml::_('link', $next_link, $this->product->neighbours ['next'][0] ['product_name'], array('rel'=>'next','class' => 'next-page','data-dynamic-update' => '1')); } ?> <div class="clear"></div> </div> <?php } // Product Navigation END ?> That's all. Thank you, Olivia
reinhard
7 Posts
reinhard posted this 11 September 2017

I add the CMS Code above the Product Details page.

Than I copy > past your code

But doesn' work only a 404 error comes up :(

What do I wrong?

I add the CMS Code above the Product Details page. Than I copy > past your code But doesn' work only a 404 error comes up :( What do I wrong?
Support Team
Support Team posted this 12 September 2017

Hi,

The code works ok on my side as well ad created links to products:

product-nav.png

Could you please create a new private topic and provide the access to the Joomla admin panel.

Thank you,
Olivia

Hi, The code works ok on my side as well ad created links to products: !product-nav.png! Could you please create a new private topic and provide the access to the Joomla admin panel. Thank you, Olivia
You must log in or register to leave comments