Display VM2Sounds plugin in Category

More
10 years 10 months ago #17767 by jpach
Hi

Is it possible to display the VM2Sounds plugin for Virtuemart in category- / releated-view or in short description.

Finally I need the Album-Description on top like short-description and below all Mp3-songs (child-products) listed with a demo-preview in or next to short description.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #17768 by nordmograph
Hello
No, as being a VMCustom plugin, it is only displaying where this type of plugin is supposed to display.
however if you look at the
components/com_virtuemat/view/productdetails/templ/default.php

you'll find different vmcustom plugins position
(default are: ontop, normal, onbot)

You can add your own adding anywhere in that page:
Code:
if (!empty($this->product->customfieldsSorted['onbot'])) { $this->position='onbot'; echo $this->loadTemplate('customfields'); } // Product Custom ontop end
Make sure you modify 'onbot" with your own new vmcustom plugin position name

Btw, If you make any change to that page, it is recommended you use template override.
Copying thatt file to
root\templates\[your_template]\html\com_virtuemart\productdetails
Then modifying this new file.

Hope it helps.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #17770 by jpach
Thanks for the quick reply.

I already added custom positions in the product-view and also did the overrides to html/com_virtuemart/productdetails/default.php of the product description. That's not the problem.

I try to display it in the category-view. But methods I tried only display the title of the custom field made or (method: link ) it shows the whole plugin with all its configuration-possibilities like in backend in the frontend .

With Product Builder I can display cart attributes easily - and it works fine but the VM2Sound-plugin will not.

Is there really no way to do this ?

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #18600 by MotyF
Add this for CATEGORY/TPL/DEAULT.PHP
Code:
<?php // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select all records from the user profile table where key begins with "custom.". // Order it by the ordering field. $query->select(array('custom_value')); $query->from('#__virtuemart_product_customfields'); $query->where('virtuemart_product_id='.$product->virtuemart_product_id); $query->order('ordering ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); // Load the results as a list of stdClass objects. $results = $db->loadObjectList(); // print_r($results); echo '<ul>'; foreach ($results as $result) { if(!empty($result->custom_value)) { echo '<li>'.$result->custom_value.'</li>'; } } echo '</ul>'; ?>

but you will see only the name of the plugin. Also, I try to show the player in Category view

Please Log in or Create an account to join the conversation.

Time to create page: 0.319 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.