Jump to content

Voucher Box not displayed due to PayPal Module (with Firefox only)


Recommended Posts

Hi everybody,

 

I have just installed the Prestashop 1.5.3.1 and then enabled the PayPal Module.

 

I note that by activating such module the voucher box (below the cart summary) is no more displayed by using Firefox browser (with IE and Chrome it is displayed).

 

I have investigated through the source code of the module and I have found that the javascript code of "/modules/paypal/views/templates/hook/paypal.js" remove the form "id=cart_voucher"

 

The code is:

 

/* 1.5 One page checkout*/
var qty = $('.qty-field.cart_quantity_input').val();
$('.qty-field.cart_quantity_input').after(qty);
$('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove();

var br = $('.cart > a').prev();
br.prev().remove();
br.remove();
$('.cart.ui-content > a').remove();
var gift_fieldset = $('#gift_div').prev();
var gift_title = gift_fieldset.prev();
$('#gift_div, #gift_mobile_div').remove();
gift_fieldset.remove();
gift_title.remove();

 

How to solve this issue? Has anyone had the same problem?

 

Thanks and regards

Salvatore

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

That's it, just edit your www/themes/yourtheme/shopping-cart.tpl and modify this line :

 

<td colspan="5" id="cart_voucher" class="cart_voucher">

 

to

 

<td colspan="5" id="cart_voucher2" class="cart_voucher">

 

As PayPal module remove with js the element with id="cart_voucher" ;)

Link to comment
Share on other sites

  • 3 months later...

hi, I have the same problem but it's not with the Paypal module. If I turn off paypal I have the same bug.

the <div id="cart_voucher" class="table_block"> is empty in the source code.

It's not a templates problem, cause I have try with the default theme.

 

I don't understand... 

 

Do you have an other idea ?

 

the site is http://www.ampoule-eclairage-led.com in command page

thanks in advance 

Link to comment
Share on other sites

  • 1 year later...

So, the PayPal module updated last night. Not only did it reset to only allowing US$ and therefore not allowing customers in our country to pay, it also reset the shopping-cart.tpl file and now (yet again) vouchers and the trashcan (on the product line) no longer display, certainly for me in Safari and Firefox.

 

Is there anyone that can get through to the huge faceless operation that is PayPal and get this buggy module addressed and fixed once and for all?

 

Unfortunately it's kind of essential for many merchants!

 

And in the meantime, the fix described above that use to work, no longer works. Anyone know why? Using 1.6.0.9...

 

Chris

http://www.PROtastic.co.uk

Link to comment
Share on other sites

  • 2 months later...

So, the PayPal module updated last night. Not only did it reset to only allowing US$ and therefore not allowing customers in our country to pay, it also reset the shopping-cart.tpl file and now (yet again) vouchers and the trashcan (on the product line) no longer display, certainly for me in Safari and Firefox.

 

Is there anyone that can get through to the huge faceless operation that is PayPal and get this buggy module addressed and fixed once and for all?

 

Unfortunately it's kind of essential for many merchants!

 

And in the meantime, the fix described above that use to work, no longer works. Anyone know why? Using 1.6.0.9...

 

Chris

http://www.PROtastic.co.uk

Hi Chris,

 

did you solve it?

 

I have the same problem.

 

Thanks

Angela

Link to comment
Share on other sites

  • 3 months later...

Hi all!

I just fixed the same problem on Prestashop 1.6.0.6

The shop's owner called us because the voucher block didn't appear on Mac platform (latest O.S. version) with Chrome browser. I've verified that also on my Firefox (latest version) on Windows 7 the block didn't appear, so I found this topic and solved changing the ID of the block like amerigeau described.

Is it possible that after 2 years (the first post has been written in 2013) this problem continues to affect the PayPal module?

Why is there a line that removes the voucher block's content?

I can't figure it out

Maybe someone of the Prestashop Gurus can help to understand this? :)

 

Thanks anyway for providing me solution ;)

 

P.S.: updating the PayPal module didn't help at all, the problem continues to be there.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
I have upgraded to 1.6.1.7 and experience the voucher issue. I have the box but all highlighted vouchers do not show at the bottom of the cart. I have looked for amerigeau's code and changed line items to match but no luck. I have also:

 

(1) Seen in the database that PS_CART_RULE_FEATURE_ACTIVE is set to 1.

(2) Don't see duplicate DB items.

(3) Voucher code is not set to "false" or "display:none"

(4) Created a new voucher that works but does not show as it is set to highlight.

(5) All modules are updated.

 

Any suggestions?

 

(6) I have also unhooked paypal from DisplayHeader without luck.

(7) I have change id="cart_voucher"  to  id="cart_voucher2" to not conflict with paypal without luck

 

More information found: I have 8 vouchers that are set to highlight which don't highlight in the cart. When I switch a 9th voucher that was never highlighted for the cart the "Take advantage of our exclusive offers:" comes up with that voucher. 

 

Lastly, if I create a new voucher without highlighting but then turn on highlighting after saving it shows. I use the DB an BO to manipulate highlighting for testing.

 

Any ideas?

 

 

Update: More research and I can get old vouchers to highlight if I set: The cart must contain at least "X" product(s)  to 1 in the Backoffice.

 

I've cleared cache by FTP and backoffice.

 

Any ideas?

Edited by techtech (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Quite annoying "feature" what paypal has there.

I don't even use the "one page checkout" and there is no "if one page checkout" function visible in the paypal.js

I am afraid to change the div-ID, I hope this does not affect the functionality of Prestashop.

 

Link to comment
Share on other sites

  • 4 months later...

this bug affecting me also with PS 1.6.1.12 with Paypal v3.11.4

I0've reported to paypal developer the bug hope they fix the bug if no express chekout is selected.

 

I hope that changing the <td colspan="5" id="cart_voucher" class="cart_voucher"> to <td colspan="5" id="cart_voucher2" class="cart_voucher"> not affect some prestashop features. I've in the while renamed the paypal.js line:

 

$('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove();

to

$('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher_2 *').remove();

 

and seems working ok beacuse i not use express checkout anyway

Link to comment
Share on other sites

×
×
  • Create New...