News:

Support the VirtueMart project and become a member

Main Menu

Modal Popup Text Mods

Started by quincythequill, July 17, 2012, 08:29:11 AM

Previous topic - Next topic

quincythequill

Hi All

Can anyone point me in the direction to where I can modify the text that comes up in the popup window that appears when the "add to cart" button is clicked. I would simply like to change the text for "out of stock" to some other text or perhaps show an image and maybe tweek the box itself.

VM2 2.08a  Joomla 1.5.26

Thanks

ivus

Hi quincythequill,

Two part question...

       
  • to change the "out of stock" text - you can log into the back end and use LANGUAGE OVERRIDES (>Extensions > Language Manager > Overrides). Add a new entry and on the edit page simply do a search for the terms you want to alter. A little trick I use if I'm trying to find the location of a code/layout page is to do a search for the term in the language overrides and then take it's CONSTANT value to then do a search through my code. Which leads us to your first question....
  • I did a search for "SHOW CART", the text that appears in that modal box, which returns "COM_VIRTUEMART_CART_SHOW_MODAL". A search through my code tells me the only instance of that constant appears in the "public function addJS()", in the file "components\com_virtuemart\controllers\cart.php"
Go nuts, but as far as changing the layout without hacking the core code... that's another issue. You can start here...

http://extensions.joomla.org/extensions/style-a-design/templating/15611


I use this to modify/extend controllers.




quincythequill

#2
Thanks Ivus,

Just one problem with your suggestion. In (>Extensions > Language Manager >) I dont have overrides so Im guessing its a plugin ?   Surely there is an actual place in the code where these text strings exist ??

ivus

Hi quincythquill,

sorry I didint notice that you said you were using J!1.5.

You can manually change the text in the language file located at

\language\en-GB\en-GB.com_virtuemart.ini

I hope this helps.

quincythequill

Thanks ivus,

I searched every bit of the virtuemart folders and didn't realise that there was stuff in the joomla area. Pretty obvious now.
Can fix all the things i want now.
Now if I can only get a good looking theme that works

Thanks again