Product page- display SKU and short descr below title

GK User
Fri Mar 20, 2015 6:51 pm
Hi, using Joomla 3, Virtuemart 3. Is it possible to:

1. Display product SKU# right below product title (area where price is shown)?
2. Display short product description right below the product title (again, where price is shown)?
3. How can I change button "Add to cart" to "Add to order"?

Thank you,

Andrea
User avatar
Fresh Boarder

teitbite
Sun Mar 22, 2015 5:58 pm
Hi

3. You can change the translation of text for button in vm language files in /languages/en-GB folder
1&2. You need to edit file /html/com_virtuemart/productdetails/default.php and add this code right below the code displaying title:

Code: Select all
<?php echo $this->product->sku; ?>
<?php echo $this->product->product_s_desc; ?>
User avatar
Moderator

GK User
Sat Apr 18, 2015 10:19 pm
Hi teitbite,

after reading a lot of forums I tried this change in all the ways I have found, but it doesn't work for me.
I'm using shop and buy on joomla 3 (vm 3).

With the code you suggest in this post, I also tried the following codes:

Code: Select all
   <?php
   if( !empty( $products_sku )) { ?>
   Product SKU:<?php echo $products_sku ?>


Code: Select all
   <div class="product-sku">
   <?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_SKU'); ?> :
   <?php echo $this->product->product_sku; ?>
   </div>


Code: Select all
   <?php //Modifica Prodotto SKU
    if($product->product_sku) echo JText::_ ( 'COM_VIRTUEMART_PRODUCT_SKU' ).": ".$product->product_sku;
   ?>   


Code: Select all
   <?php
   // Product SKU
   echo $this->product->product_sku
   ?>   


I used them as an override: mydomain/html/com_virtuemart/productdetails
and I used them in the original file: mydomain/components/com_virtuemart/views/productdetails

But nothing is changing in my product pages.
Please, could you help me and show me where I'm wrong?

Thank you for your help,
chrisrbk
User avatar
Senior Boarder

GK User
Sun Apr 19, 2015 5:45 pm
Hi teitbite,

I solved with the code

Code: Select all
<?php echo '<span class="bold">'.JText::_("COM_VIRTUEMART_PRODUCT_SKU").'</span> : '.$this->product->product_sku; ?>


and I finally found that your templates (shop and buy in my case) already have all php files overridden in "my_domain/templates/my_template/html/com-virtuemart" folder.
And now it works fine!

With this change I also could add product_gtin and product_mpn. I will use them for other porduct codes that are needed in my site.

I hope this could help other users.

Best, chrisrbk
User avatar
Senior Boarder

teitbite
Mon Apr 20, 2015 5:54 pm
Hi

It will help for sure. Thank You for shearing with us.
User avatar
Moderator


cron