Jump to content

Edit History

pixelicous

pixelicous


updated finds

On 7/17/2020 at 9:58 AM, D. Tengler said:

 

Ok, I tried your suggestion, and basically the idea should work.

However, when you use "checked", for some reason clicking on the paypal buttons after generate errors.

No matter what I do, when i do the "checked" hack to select automatically, the form fails.

I tried even without any IF statements, didn't hide the form or input html tag and its just the same.

I think {if $logged} is deprecated btw, only $customer.is_logged should be used. 

 

I have a new issue though,  I switched to the new official prestashop/paypal module 

The modules doesnt honor that order setting of showing "Terms and conditions". (preferences>order settings)

So i dug in, there is no check if $conditions_to_approve exists.

I cloned the github repo, started checking inside. Shame you can't open any issues there, it's so annoying.

 

When I tried modifying the file paypal.tpl (under /modules/ps_checkout/views/templates/front/paymentOptions) myself and add that bit:

Whether it is  {if $conditions_to_approve|count}   or {if $conditions_to_approve}   it just doesn't display anything, i added debug printouts to the template files, there is no value.

I had issues with $customer.is_logged, for some reason it was true also for a guest? I don't understand why.. so when is a customer not logged? maybe before he enters details at the first step? I was entering my debug print outs at payment.

What worked for me is {if $customer.is_logged && not $customer.is_guest}

 

Any idea where i should look out for passing $conditions_to_approve from the code/functions? So it will have some value. Never had prestashop development experience yet, I guess this module does some sort of module override, but i can always change the code directly, maybe even suggest it as a pull request to the original code as it will help everyone!

 

 

pixelicous

pixelicous


new finds

On 7/17/2020 at 9:58 AM, D. Tengler said:

 

Ok, I tried your suggestion, and its working so thank you.

I think {if $logged} is deprecated btw, only $customer.is_logged should be used. 

 

I have a new issue though,  I switched to the new official prestashop/paypal module 

The modules doesnt honor that order setting of showing "Terms and conditions". (preferences>order settings)

So i dug in, there is no check if $conditions_to_approve exists.

I cloned the github repo, started checking inside. Shame you can't open any issues there, it's so annoying.

 

When I tried modifying the file paypal.tpl (under /modules/ps_checkout/views/templates/front/paymentOptions) myself and add that bit:

Whether it is  {if $conditions_to_approve|count}   or {if $conditions_to_approve}   it just doesn't display anything, i added debug printouts to the template files, there is no value.

I had issues with $customer.is_logged, for some reason it was true also for a guest? I don't understand why.. so when is a customer not logged? maybe before he enters details at the first step? I was entering my debug print outs at payment.

What worked for me is {if $customer.is_logged && not $customer.is_guest}

 

Any idea where i should look out for passing $conditions_to_approve from the code/functions? So it will have some value. Never had prestashop development experience yet, I guess this module does some sort of module override, but i can always change the code directly, maybe even suggest it as a pull request to the original code as it will help everyone!

 

 

pixelicous

pixelicous

On 7/17/2020 at 9:58 AM, D. Tengler said:

 

Ok, I tried your suggestion, and its working so thank you.

I think {if $logged} is deprecated btw, only $customer.is_logged should be used. 

 

I have a new issue though,  I switched to the new official prestashop/paypal module 

The modules doesnt honor that order setting of showing "Terms and conditions". (preferences>order settings)

So i dug in, there is no check if $conditions_to_approve exists.

I cloned the github repo, started checking inside. Shame you can't open any issues there, it's so annoying.

 

When I tried modifying the file paypal.tpl (under /modules/ps_checkout/views/templates/front/paymentOptions) myself and add that bit:

Whether it is  {if $conditions_to_approve|count}   or {if $conditions_to_approve}   it just doesn't display anything, like that variable is $false

When i try to use {if $customer.is_logged} it does present the data, which is weird, because the user is not logged in, checked out as guest.

 

 

Any idea where i should look out for passing $conditions_to_approve? Never had prestashop development experience yet, I guess this module does some sort of module override, but i can always change the code directly, maybe even suggest it as a pull request to the original code as it will help everyone!

 

 

×
×
  • Create New...