Hello
I use VM 3
I want to display in all modules of virtuemart under product_name the product_sku.
What i have to do because all existing tutorials are for old versions of VM.
I managed to add sku and weight in product page but i cannot add sku in
Featured products
Random products
Top sellers etc.
If you mean mod_virtuemart_product module, create a template override of /modules/mod_virtuemart_product/tmpl/default.php. If you meant VirtueMart frontpage and/or category pages, create an override of products.php sublayout http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
Thanks for immidiate reply but i will need some step by step help in this matter if you can please.
Hello
I managed to enter the sku in categories by edditing
templates\YOUR_TEMPLATE\html\com_virtuemart\sublayouts\products.php
adding
<?php // Product Sku
if (!empty($product->product_sku)) { ?>
<p class="product_sku">
<?php echo $product->product_sku; ?>
</p>
Now i only need to find where and what i must edit to display sku in
eg Random products module.
eg latest products module.
There it displays only product name and image.
I need to add SKU also.
Create a template override of /modules/mod_virtuemart_product/tmpl/default.php. It should be placed in templates\YOUR_TEMPLATE\html\mod_virtuemart_product\default.php.
hello
Can you please explain how to do this?
Create a template override of /modules/mod_virtuemart_product/tmpl/default.php. It should be placed in templates\YOUR_TEMPLATE\html\mod_virtuemart_product\default.php.
Open /modules/mod_virtuemart_product/tmpl/default.php and copy its contents to /templates/YOUR_TEMPLATE/html/mod_virtuemart_product/default.php.
Maybe this will help. It's old but still valid for modules: http://www.ostraining.com/blog/joomla/overrides
I did this
Open /modules/mod_virtuemart_product/tmpl/default.php and copy its contents to /templates/YOUR_TEMPLATE/html/mod_virtuemart_product/default.php.
I changed in product_name to product_sku in 4 fields and no change happened.
I can confirm this bug... No matter what I add/remove to templates/mytemplate/html/mod_virtuemart_product/default.php file it doesn't work... On the other hand... if I try same thing in original file (not override) it works fine... Its like override for this module doesn't work.
This is probably because the override is disabled. Go to your product module settings and change Layout from 'No override' to 'default'.
Quote from: Ghost on March 15, 2016, 10:46:49 AM
This is probably because the override is disabled. Go to your product module settings and change Layout from 'No override' to 'default'.
This helped! Thank you! ;)
Hello
I managed to solve this matter by adding
<?php echo $product->product_sku ?>
next to
php echo $product->product_name ?>
in
/public_html/templates/yourtemplate/html/mod_virtuemart_product/default.php
If you use overide then add also in overide php.