Change the paypal express button

  • Posts: 12
  • Thank you received: 0
3 years 2 months ago #335885

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9
-- PHP version -- : 8
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : error en paypal

How do I change the appearance of the paypal express button in the shopping cart?

attach the image that mentions them

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 2 months ago #335892

Hi,

I think the best solution would be to do that with CSS, as explained here:
stackoverflow.com/questions/28832129/rep...c-location-using-css
In the CSS proposed in the first solution there, you could replace .application-title with #paypal_express_button and then adapt the width/height/image path of the CSS code to your situation with that PayPal Express button and the image you want to use instead for it.
Here is a tutorial on adding custom CSS:
www.hikashop.com/support/documentation/1...ize-the-display.html

A simpler solution would be to directly change the src of the img tag in the file plugins/hikashoppayment/paypalexpress/paypalexpress.php:

$this->button = ''
			. '<div id="paypal_express_button" style="width:144px; height:46px; margin-top:15px;"><a href="'.$notif
			. '&setExpressCheckout=1"><img src="https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image&buttontype'
			. '=ecshortcut&locale='.str_replace('-','_',$lang->get('tag')).'"></a></div>';
However, you'll loose your change each time you update your HikaShop and thus you'll have to reapply it. So I think the CSS solution would be better for the long run.

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum