Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - FashionMart (SKU# FLEX-00008)

TOPIC: Product SKU show

Product SKU show 7 years 5 months ago #1447

Hi
i use vm 2.0.14 and updated to the latest fashiomart template.
The problem is that i cannot find how to show PRODUCT SKU in the product details and also how to add cart button in the default product view (there where you have the option to see each product with quick view)

please help
Last Edit: 7 years 5 months ago by A Advuser.
The topic has been locked.

Product SKU show 7 years 5 months ago #1455

By the default,

"add to cart" button is invisible in the category browse page (in GRIDview).
They appear only in LIST View (LIST view is when you click the switch button to change the layout from GRID to LIST).

It is simply because there is no enough space to show them (because when custom fields are added to any product, it is not okay to show add to cart button right away in category browse page, because visitor won't be aware there some attributes to select and they would add the product to cart right away without choosing attribute)

The SKU should appear in the product details page though, i don't know why it doesn't appear in your website. But you can add it manually if you would like, the PHP line to show the SKU is this:
<?php echo $this->product->product_sku ?>

Open this PHP file:
ROOT/templates/<yourjoomlatemplatefolder>/html/com_virtuemart/productdetails/default.php

and add that PHP line to where ever you want (most likely below the product name) and the SKU will appear there.

Regards.
Forum Support.
The topic has been locked.

Product SKU show 7 years 5 months ago #1473

Hi and thank you for your reply

concerning the SKU i managed to display it in the product details and the quick view.
The problem is that i do not know which file to edit to display it in the product view (the page which displays all the products and have the option to see list view and thumbnail view). Which file should i edit to add the SKU under the Title?

kind regards

Andreas
The topic has been locked.

Product SKU show 7 years 5 months ago #1543

Hi,

you mean "category browse page" right?
Well, it depends which PHP file you should make edits. It depends which "category browse page" layout you have chose through VM Configuration.

The PHP file is this:
ROOT/templates/<yourjoomlatemplatefolder>/html/com_virtuemart/category/default.php
(default.php, defaultlist.php, flexv2,php, flexv2list.php depends on the category browse page layout you chose from VM Configuration).

Open that PHP file and look for this PHP line:
<div class="....someclassname....">
      <?php echo JHTML::link($product->link, $product->product_name); ?> 
</div>

The class name (....someclassname....) will changed based on the category browse page version, but the PHP line is always the same..
(be aware, you are going to find this line in 2 different line numbers, make the change for both 2)

and change it and make them look something like:
<div class="....someclassname....">
      <?php echo JHTML::link($product->link, $product->product_name); ?> 
</div>
<div class="FlexibleListBrowseSKU">
    <?php echo $product->product_sku ?>
</div>

(BE AWARE, THE PHP LINE IS DIFFERENT NOW, IT IS $product->product_sku FOR CATEGORY BROWSE PAGE, BUT IT WAS $this->product->product_sku FOR PRODUCT DETAILS PAGE.)


And then in any CSS file that is loaded in your website; style this .FlexibleListBrowseSKU DIV tag by this CSS rule:
.FlexibleListBrowseSKU {
font-color:#ccc;
font-size:10px;
}


Forum support.
Last Edit: 7 years 5 months ago by Support.
The topic has been locked.

Product SKU show 6 years 5 months ago #7707

I need to make an XML feed.
If i will add the SKU next to the product name by the way you are describing above, is it possible the SKU to be readable from the XML feed module or i have to note the SKU manually to each product?
Also i need you to tell me the way to add the SKU to the product name but in the same row and not in a second row. (i mean exactly next to the product name)

Please reply to this asap because i need to get my eshop online in 5 days.

Thank you for your support.
The topic has been locked.

Product SKU show 6 years 5 months ago #7717

Hi,

What you are asking is a custom modification.
Unfortunately we don't provide step-by step instruction for specific custom requests. Especially for the XML feed thing you are trying to do.

I can only guide you on this.
If you want to move the SKU number next to product name, then you need open the product details page:

/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
(default.php or flexv2.php which ever layout you are currently using for product details page)

And look for this line:
<div class="FlexibleProductDetailProductName"><?php echo $this->product->product_name ?></div>

This line above prints the product name. Right next to it, you can include the SKU variable.
which is this:
<?php echo $this->product->product_sku ?>

So eventually you will have this below:
<div class="FlexibleProductDetailProductName"><?php echo $this->product->product_name ?> - <?php echo $this->product->product_sku ?></div>

The line above will print the Product Name - SKU Number

Regards.
Support
Last Edit: 6 years 5 months ago by Support.
The topic has been locked.

Product SKU show 6 years 5 months ago #7730

Thank you for your prompt reply.
It is working.
But how can i do the same to the category view? I tried by myself but is is more complicated than the product details view.
The topic has been locked.

Product SKU show 6 years 5 months ago #7762

Hi,

Yes, it can be little complicated in category browse page because there are 3 different views in the category page (ListView, GridView, MultiGridView)

This time, you will look for this line below (which is used to print the product name)
<?php echo $product->product_name ?>

And the PHP line to print the SKU number is this:
<?php echo $product->product_sku ?>

Regards,
Support
The topic has been locked.

Product SKU show 6 years 5 months ago #7771

thank you very much
The topic has been locked.

Product SKU show 6 years 5 months ago #7816

sure, your welcome.

Case solved. Topic closed.

Regards,
Support
The topic has been locked.
Time to create page: 0.296 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo