Jump to content
  • 0

Change Paypal Button?


Question

Posted

That Paypal Standard button is terrible.

There's too many things in Blesta that are not obviously "CLICK HERE" type actions. The UI needs work.

 

I see that

\components\gateways\nonmerchant\paypal_payments_standard\views\default

has

process.pdt

and in it is

	$button_url = $recurring ? "https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_LG.gif" : "https://www.paypalobjects.com/en_US/i/bnr/horizontal_solution_PP.gif";

Great! I can change it.

But at next update, will it be overwritten? I assume so.

 

So how can "default" be change to something not default? I don't want it to be (template/theme) overwritten.

5 answers to this question

Recommended Posts

  • 0
Posted

I don't think there is another way other than to change the line of code each time you update. I use these buttons:

$button_url = $recurring ? "https://www.paypalobjects.com/webstatic/en_US/btn/btn_subscribe_113x26.png" : "https://www.paypalobjects.com/webstatic/en_US/btn/btn_paynow_107x26.png";
  • 0
Posted

You think we can make a plugin for this simple action?

 

Specify a button name/location (domain.com/img.gif), then simply upload the desired image into it. The problem is, however, that I'm not seeing that a simple "replace X code in X file" is possible. In this case, that line of code in the payment confirm page. The plugin system seems to be very narrow in scope. But that just can't be right, as other plugins do more. So some things are just undocumented?

 

Make manual changes are every update is annoying.

  • 0
Posted
  On 9/26/2015 at 8:51 PM, kpmedia said:

You think we can make a plugin for this simple action?

 

Specify a button name/location (domain.com/img.gif), then simply upload the desired image into it. The problem is, however, that I'm not seeing that a simple "replace X code in X file" is possible. In this case, that line of code in the payment confirm page. The plugin system seems to be very narrow in scope. But that just can't be right, as other plugins do more. So some things are just undocumented?

 

Make manual changes are every update is annoying.

 

plugin is not needed here or simply it would not do anything .

 

if you want to be far from the update , just clone the gateway and rename the class , uplad your own pics and all are done .

  • 0
Posted
  On 9/26/2015 at 10:49 PM, naja7host said:

just clone the gateway and rename the class , uplad your own pics and all are done .

 

I'm not sure what you mean here.

 

Do you mean:

 

1. clone it (got that part)

 

2. In paypal_payments_standard.php change

class PaypalPaymentsStandard extends NonmerchantGateway {

to something like

class PaypalClone extends NonmerchantGateway {

3. And then change the process.pdt as per above for the image?

 

Confirm this is it.

Edit, nope not it still. Something is still missing. Blesta cannot find the clone.

 

_______

 

I guess that's one way. It does seem a bit drastic, but I'm guessing the gateway won't need updates often, if ever.

 

I'd still be interested in a "code swap" type plugin, if possible. I can see a lot of potential with it. I can see the code in my mind, in terms of usage. But I'm not sure how to start it.

 

The menu is something I want to tackle on both frontend and backend. Right now, I'm hardcoding everything.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...