VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: kreetz on May 30, 2012, 11:50:05 AM

Title: sku code missing in front-end
Post by: kreetz on May 30, 2012, 11:50:05 AM
Hello everybody!
I have a problem about the sku code.

I can't even see it in front-end in product detail and in the browse page.

Can you help me?

I  use Joomla 2.5.4 and VM 2.0.6

this is the website
http://www.t-tradeitaly.com/prodotti

sorry if my english is not so good.

Have a great day
Title: Re: sku code missing in front-end
Post by: sadrem on May 30, 2012, 12:55:31 PM
You need to modify default.php under productdetails or ovveride in Your template.
add lines of code
<div class="product-sku">
    <?php
    echo 
JText::_('COM_VIRTUEMART_PRODUCT_SKU').': ';
    echo $this->product->product_sku;
    ?>

        </div>
Title: Re: sku code missing in front-end
Post by: kreetz on May 30, 2012, 16:23:52 PM
Quote from: sadrem on May 30, 2012, 12:55:31 PM
You need to modify default.php under productdetails or ovveride in Your template.
add lines of code
<div class="product-sku">
    <?php
    echo 
JText::_('COM_VIRTUEMART_PRODUCT_SKU').': ';
    echo $this->product->product_sku;
    ?>

        </div>


Thank you so much!
It works in detail page...but I'd like to have it in browse page too.
I thought it were a browse.php or something, but I cannot find it!

Can you tell me that?
I think it will be necessary insert the same code in the browse file.
Title: Re: sku code missing in front-end
Post by: sadrem on May 30, 2012, 16:36:26 PM
default.php under com_virtuemart\views\category
Title: Re: sku code missing in front-end
Post by: kreetz on May 30, 2012, 16:51:47 PM
ok! thank you!

I put the code in the default.php in category->tmpl and it seems to work but not completely.
I can see the name "codice prodotto" that means "items sku" or something but the code is not shown.

I can see it perfectly in the detail page but not in browse.

the code is that one you gave me and I put it in "div class="width70 floatright" just before the product short description (about line 497)
Title: Re: sku code missing in front-end
Post by: kreetz on May 30, 2012, 17:04:10 PM
I got it!

sorry! :)

I just changed the line

echo $this->product->product_sku;

in

echo $product->product_sku;

thank you again!
Title: Re: sku code missing in front-end
Post by: sadrem on May 30, 2012, 17:04:35 PM
fro product list add code like this
<div class="product-sku">
    <?php
    echo 
JText::_('COM_VIRTUEMART_PRODUCT_SKU').': '.$product->product_sku;
    
    ?>

        </div>
Title: Re: sku code missing in front-end
Post by: mastrolitto on December 04, 2012, 21:03:30 PM
in reference to your post (http://forum.virtuemart.net/index.php?topic=103311.0) about how to display the product sku in frontend you please tell me which line you must enter the code. thanks!
excuse my English