VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: raunhar on November 01, 2012, 17:10:42 PM

Title: Rename Add to Cart button to Buy Now
Post by: raunhar on November 01, 2012, 17:10:42 PM
I want to rename the Add to Cart Button to Buy Now.
Also There will be just one quantity, so I ned to remove the +/- signs before the button, so that by default only one gets selected.
Title: Re: Rename Add to Cart button to Buy Now
Post by: K&K media production on November 01, 2012, 17:37:21 PM
To rename the button you can use a language override.

See here:
http://www.inmotionhosting.com/support/edu/joomla-25/language/add-new-language-override

To hide the quantity +/- buttons use a template override. Copy the file

components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php

to

templates/your_template/html/com_virtuemart/productdetails/default_addtocart.php

and comment this out


<!--
<span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus"/>
<input type="button" class="quantity-controls quantity-minus"/>
    </span>
-->

Title: Re: Rename Add to Cart button to Buy Now
Post by: bytelord on November 01, 2012, 18:38:47 PM
Hello,

You could use language override as kkmediaproduction suggest you (some information here also: http://forum.virtuemart.net/index.php?topic=92944.0 and here: http://www.ostraining.com/blog/joomla/languge-manager/)

For your second question i will also suggested just comment them out using some CSS:

.quantity-controls {
display:none;
}

Also take a look on the following post: https://forum.virtuemart.net/index.php?topic=106607.0

Some more information regarding templates:

Use firebug to examine you site code and css styling: http://forum.virtuemart.net/index.php?topic=102850.0
template overrides: http://forum.virtuemart.net/index.php?topic=98505.0
Using the template system: http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system.

Regards
Title: Re: Rename Add to Cart button to Buy Now
Post by: saviB on November 01, 2012, 19:10:54 PM
Hey bytelord, speaking of language overrides, I've been unable to find an override for the Prev and Start in pagination. Any clue?
Title: Re: Rename Add to Cart button to Buy Now
Post by: K&K media production on November 01, 2012, 19:45:20 PM
Hi,

maybe this:

JPREV for Prev

start and end are symbols, no language keys

regards
Title: Re: Rename Add to Cart button to Buy Now
Post by: saviB on November 01, 2012, 20:18:05 PM
Great! That worked. So does JNEXT. Is there a way edit Start and End symbols?
Title: Re: Rename Add to Cart button to Buy Now
Post by: bytelord on November 02, 2012, 11:10:49 AM
Hello,

Start and End symbols? Is that part of vm pagination? I am not sure, any screenshot?

Regards
Title: Re: Rename Add to Cart button to Buy Now
Post by: K&K media production on November 02, 2012, 21:43:30 PM
I was wrong, here the keys:

JLIB_HTML_START
JLIB_HTML_END

regards
Title: Re: Rename Add to Cart button to Buy Now
Post by: raunhar on November 05, 2012, 08:02:00 AM

Can we remove the quantity box

Quote from: kkmediaproduction on November 01, 2012, 17:37:21 PM
To rename the button you can use a language override.

See here:
http://www.inmotionhosting.com/support/edu/joomla-25/language/add-new-language-override

To hide the quantity +/- buttons use a template override. Copy the file

components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php

to

templates/your_template/html/com_virtuemart/productdetails/default_addtocart.php

and comment this out


<!--
<span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus"/>
<input type="button" class="quantity-controls quantity-minus"/>
    </span>
-->


Title: Re: Rename Add to Cart button to Buy Now
Post by: bytelord on November 05, 2012, 18:03:24 PM
http://forum.virtuemart.net/index.php?topic=106607.msg367213#msg367213