steve189 1 Posted February 3, 2010 Posted February 3, 2010 Whilst dabbling with the featured items module on the homepage I noticed one of the items Add to cart button was paler and disabled...A quick check confirmed the item was entered as Out of stock. It kind of annoyed me that even though the button was disabled the anchor text over it still showed "Add to cart" and I quickly imagined a frustrated user clicking like mad on the Add to cart link while nothing happened so my question was:How can I alter the link anchor text from "Add to Cart" to "Out of Stock" when the button is disabled?Well, having spent half the day Googling and scouring this forum for an answer and getting nowhere fast I decided to have a look for the answer myself...Voila! Go to:modules/homefeatured/homefeatured.tplCheck out line 22, the line to call the in stock state of play then below there is an {else} to assign the out of stock class and change the button state from the cssOn line 24 you'll see this: {l s='Add to cart' mod='homefeatured'} Well that's it, swap the Add to Cart for Out of Stock like so: {l s='Out of stock' mod='homefeatured'} and that's it... job's a goodun! Now I'm just a tad miffed I spent so long looking elsewhere for an answer )So now the disabled button also shows the wording Out of stock - if you want to alter the colour of the anchor text it's in the global.css file for the theme. I've modified my css a lot so I won't include a line number is it will no doubt be different but use the find function of your text editor to lookup: /* exclusive disabled button */Hope that helps anyone out there wanting the same thing. Share this post Link to post Share on other sites
mohsart 18 Posted February 3, 2010 Posted February 3, 2010 You may want to check the code in themes, product-list.tpl as well/Mats Share this post Link to post Share on other sites
steve189 1 Posted February 3, 2010 Posted February 3, 2010 Yeah, I did that too. I was wondering whether to edit my original post but no need now, thank yee! Share this post Link to post Share on other sites
nuttis 3 Posted April 17, 2010 Posted April 17, 2010 Thank you for this thread!I have just started to learn this things and have been looking and looking to find out where to change this text! Finaly it is changed! Share this post Link to post Share on other sites
Recommended Posts