Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Security Level: All-users
    • Labels:
      None

      Description

      When a person had a voucher in version 1.4, the voucher code was displayed in the cart at checkout. The person only needed to click on the voucher and it was transferred to the voucher field where it could be applied.

      In version 1.5.3.1 the voucher field is displayed, but there are no vouchers shown. A person can manually type in the voucher and it will work, but this approach is inconvenient. Thanks to @ lordcracker who answered my post on the forum, the following corrected the problem so it behaves like it was in version 1.4:
      http://www.prestashop.com/forums/index.php?/topic/218019-solved-vouchers-not-dispalyed-in-cart-or-my-vouchers/page__view__findpost__p__1076214

      edit the file /controllers/DiscountController.php

      on line 46 change from:

      $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules));

      to:

      $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules));

        Activity

        Hide
        Damien Metzger added a comment -

        Fixed
        Thank you for the patch!

        Show
        Damien Metzger added a comment - Fixed Thank you for the patch!
        Hide
        Balzai added a comment -

        Hi
        I made changes to the file DiscountController.php, but not show the voucher code and amount. I am using prestashop 1.5.3.1 and no default template, but the problem is presented and the default template prestashop. Module in translation I am using the syntax% s
        Enter name% s voucher to receive the reduction on this order.
        You have earned a voucher worth% s thanks to your sponsor!
        Attachment screenshot

        Show
        Balzai added a comment - Hi I made changes to the file DiscountController.php, but not show the voucher code and amount. I am using prestashop 1.5.3.1 and no default template, but the problem is presented and the default template prestashop. Module in translation I am using the syntax% s Enter name% s voucher to receive the reduction on this order. You have earned a voucher worth% s thanks to your sponsor! Attachment screenshot
        Hide
        Daniel Matarredona added a comment -

        Hi

        Same problem. Made the modifications and still not work. Theme default. PS 1.5.3.1.

        Think its solved for 1.5.4.1 but, I cant upgrade still. Can you tell me the modifications you made and wich files for this to work.

        Thank you

        Show
        Daniel Matarredona added a comment - Hi Same problem. Made the modifications and still not work. Theme default. PS 1.5.3.1. Think its solved for 1.5.4.1 but, I cant upgrade still. Can you tell me the modifications you made and wich files for this to work. Thank you

          People

          • Assignee:
            Damien Metzger
            Reporter:
            Bill Kneller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: