Author Topic: How to show sold items, disabling add to cart & using 'notify me' as plain text  (Read 933 times)


  • Beginner
  • *
  • Posts: 7
    • Your Unity Store
Joomla version: Joomla! 3.9.11 Stable
Virtuemart version: 3.6.0

See reply #8 by snowgoose on May 3rd 2019 located at:

I was able to follow snowgoose's work-around for being able to display products that have been sold by creating a 'Sold' category in VM and moving products that have been sold into it.

Using the 'Notify me' link to confirm 'Sorry, this item is out of stock' works well although I can't remove the link, despite replacing the PHP code:

<a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=' . $product->virtuemart_product_id); ?>" class="notify"><?php echo vmText::_ ('COM_VIRTUEMART_CART_NOTIFY') ?></a>


<?php echo vmText::_'COM_VIRTUEMART_CART_NOTIFY') ?>

I was having great difficulty in setting up an override, so as a test I made the change in the original addtocartbar.php file. Despite this, I still can't get it to render as plain text.

You can view the generated page here:

Where have I gone wrong ~ can anyone offer me any tips? Is the sub layout category the right location to do this?

I've used overrides in Joomla with great success (until now), so I must be having a crazy moment with this one. lol

Anyhow, any and all help will be greatly appreciated!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9741
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
your over ride should be in

GJC Web Design
VirtueMart and Joomla Developers - php developers
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
Contact for any VirtueMart or Joomla development & customisation


  • Beginner
  • *
  • Posts: 7
    • Your Unity Store
Thank you very much for steering me in the right direction, GJC. This solution has enabled me to display 'Sorry, this item has been sold." as plain text on the page.

However, the image remains clickable and when taken to its own page, the following is displayed (please see attachment).

What would be the best approach to stopping sold item images from being clickable in these circumstances?

Thank you for your continued help!


  • Beginner
  • *
  • Posts: 7
    • Your Unity Store
You can see this in action here:


  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 540
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3

We use override in the template with the condition to checkbox discontinued on the product detail in the administration.

We do not use a special category for sold out products.

Discontinued products
- not in the category listing
- not in search results
- not in filtering results (if using customfilters for)
- indexed URL still exists (does not generate 404)
- the product cannot be ordered, alternative products are displayed in the module
- the product can be inquired by email

The result is here:

For me is the better solution.

Best Regards

Rudolf  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates