1

I need to display the product sku in the product list of virtuemart joomla. Is there a way to accomplish this?

  • 1
    [Why is can someone help me not an actual question](https://meta.stackoverflow.com/questions/284236/why-is-can-someone-help-me-not-an-actual-question). Also asking for tools, libraries, or off-site resources recommendation is off-topic in here – Andreas Jul 19 '19 at 08:38

1 Answers1

1

This may depend on the version of Virtumart you are running, but you should be able to do this through the use of a template override.

  1. In your websites file system copy the following file. /component/com_virtuemart/sublayouts/products.php
  2. In the template folder of the template you are running on your site create the folder, /templates/yourtemplate/html/com_virtuemart/sublayouts and paste in the products.php file
  3. Open the products.php file in your text editor of choice
  4. Locate this code (or similar depending on the version) foreach ( $products as $product ) {
  5. You are now inside the loop which outputs the list of products. Locate where you want to place the SKU and paste in echo $product->product_sku;
  6. Save the file
  7. Refresh the category page

If done correctly, where an SKU exists for the product it will appear in the product box where you have placed the code.

It's important to put this change in your template overrides to avoid your change being lost when you next update Joomla and Virtumart.

Good luck with your updates.

KevBallard