Is is possible to customize the "Add to cart" and "View Shopping Cart" in the paypal shopping cart plugin?
I would like to either like to use a custom image, such as a jpg or png, that will replace the current text or be able to change the current text such as changing or removing the current background color behind the text.
Thanks!
Offline
Hi :-)
You can only change original file
for change text go to folder plugins -> PayPalShoppingCart -> language -> 'your language' exemple en_UK for english
edit ' plugin.lang.php'
remplace
$lang['Add to cart'] = 'Add to cart';
by
$lang['Add to cart'] = 'as you want';
LOOK OUT
Changes will be lost at each update plugin
---------------------------
if you want change text by picture go to folder plugins -> PayPalShoppingCart -> edit 'main.inc.php' and Search 'Add to cart' for change
Online
When I search for "Add to Cart" in the 'main.inc.php' file I find it here:
unction ppppp_append_form($tpl_source, &$smarty){ $pattern = '#<.*\"infoTable\".*>#'; $replacement = ' <tr> <td class="label">{\'Buy this picture\'|@translate}</td> <td> <form name="ppppp_form" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" onSubmit="javascript:pppppValid()"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="{$ppppp_e_mail}"> <input type="hidden" name="item_name"> <input type="hidden" name="no_shipping" value="2"><!-- shipping address mandatory --> <input type="hidden" name="handling_cart" value="{$ppppp_fixed_shipping}"> <input type="hidden" name="currency_code" value="{$ppppp_currency}"> <select name="amount"> {foreach from=$ppppp_array_size item=ppppp_row_size} <option value="{$ppppp_row_size.price}">{$ppppp_row_size.size} : {$ppppp_row_size.price} {$ppppp_currency}</option> {/foreach} <input type="submit" value="{\'Add to cart\'|@translate}"> </form> </td> <td> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="{$ppppp_e_mail}"> <input type="hidden" name="display" value="1"> <input type="hidden" name="no_shipping" value="2"> <input type=submit value="{\'View Shopping Cart\'|@translate}"> </form> </td> </tr>
Can I add the attached image, a custom button, to replace "Add to Cart" text and still function properly?
Offline
I tried replacing
<input type="submit" value="{\'Add to cart\'|@translate}">
with
<input type="image" src="http://lavalight.thesierralight.com/lavalightgallery/PayPalShoppingCart/addcart.png" alt="submit">
but that didnt change anything.
Offline
Hi :-)
have you purge cache and template compile ?
Online
Purging the compiled templates worked and now the custom buttons are showing and functioning, but now the alignment is off and they are not displaying properly vertically. The Add to cart button is higher than the view shopping cart button. See attached link and image.
http://lavalight.thesierralight.com/lav … category/2
Offline
narmansk8 i see that you have fixt it, how did you do that?
Fixt, but to be honest i dont remember what i have done.
It was someting in the theme hr_os_xl-rules.css
Something with padding?
Last edited by sport (2014-04-29 22:40:06)
Offline