Add SKU to product category

Ecommerce design Joomla template to start your online business with VirtueMart and additional eshop features.
GK User
Thu Mar 22, 2012 5:01 pm
I asked in the Virtuemart forum but honestly I never get an answer there so I though I would ask the great code masters here for help.

After doing some research on this I found this code that does work in showing the SKU on the product catgeory page:

Code: Select all
<?php // Product Sku
echo JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' .$product->virtuemart_product_id . '&virtuemart_category_id=' .$product->virtuemart_category_id ), $product->product_sku, array ('title' => $product->product_sku ) ); ?>


The problem I have is I need it to show the title description ( SKU 933402) and I would like this number to not be linked to the product page. I can see the code that controls this but I am not a PHP guy so I am not sure how to make the right edits to make this work and it is driving me nuts!

Could someone give me the direction I need to make this work.. PLEASE??
User avatar
Expert Boarder

teitbite
Fri Mar 23, 2012 2:24 am
Hi

I'm not sure if I understand but You should try to change it to:

Code: Select all
echo $product->product_sku;
User avatar
Moderator

GK User
Fri Mar 23, 2012 3:22 am
Thanks, if I put it in like this it works...

SKU <?php echo $product->product_sku; ?>

Is that formed right not to cause problems?
User avatar
Expert Boarder

teitbite
Sat Mar 24, 2012 5:04 pm
Hi

No. This is just a simple code which is displaying a portion of text. Nothing to worry about.
User avatar
Moderator

GK User
Sat Mar 24, 2012 5:43 pm
Thanks so much teitbite,

You saved me a ton of time with this one. I found the same question answered in the VM forum by one of the developers but his solution had a typo and is why it did not work.
User avatar
Expert Boarder

teitbite
Sat Mar 24, 2012 9:46 pm
Hi

Glad I could help.
User avatar
Moderator

GK User
Tue Nov 06, 2012 10:37 pm
What page do you put that code in?
User avatar
Fresh Boarder

teitbite
Wed Nov 07, 2012 12:04 pm
Hi

Sorry. This thread is too old to remember. Please show me the page You are trying to apply this fix and maybe than I'll recall.
User avatar
Moderator

GK User
Wed Nov 07, 2012 8:34 pm
User avatar
Fresh Boarder

teitbite
Thu Nov 08, 2012 11:13 am
Hi

Ok. Looking at this I would guess that a file You are looking for is in /html/com_virtuemart/productdetails/default.php but I may be wrong to the file, anyway folder is good for sure.
User avatar
Moderator


cron