News:

Support the VirtueMart project and become a member

Main Menu

move availability information

Started by rainman2000, August 23, 2013, 01:39:54 AM

Previous topic - Next topic

rainman2000

Hi All,

I'm running Virtuemart 2 and would like to move the availability image from below the add to cart button up above the price without have to hack the code. I've been told that it may not be possible because it's positioned dynamically by the stockable plugin.  Can someone please provide me with some guidance.

Thx,
Rainman

jenkinhill

Assuming you do not already use template overrides or use a commercial VM theme, make a copy of the view template   components/com_virtuemart/views/productdetails/tmpl/default.php

Then you can edit the file to move the availability section to where you want it. The code block begins:
<?php
      // Availability

You may also need to make some css changes if needed to improve the style of the layout.

Use the edited default.php file as an override so it does not get overwritten during VM updates. You should append any new css style definitions to the end of your Joomla template css file.  Documentation for the template system is in http://docs.virtuemart.net/tutorials/33-templating-layouts.html
Also see http://www.ostraining.com/blog/joomla/overrides

If you already use template overrides then it is the override default file for productdetails that you will need to edit.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

rainman2000

Thanks Kelvyn,

We do have a Gantry based commercial template. But changing the availability code (or even deleting it) has no effect. We use stockable plugins with several attributes that change the availability image as the user selects various options. It will show "ships same day" if the item is in stock, but it will show "ships 7 - 10 days" if the quantity is 0. This was not working so a developer corrected this and I'm assuming this is what he meant by stating that the stockable plugin inserts the availability dynamically. I'll have to get clarification to see why it can't be dynamically placed somewhere else if this is the case.

Thx,
Rainman

jenkinhill

So you already have template overrides? There should still be a placeholder in the templates, so check the productdetails override files.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

rainman2000

Yes, there are template overrides in place. I'll follow your advice and see if I can accomplish this.