ballashop Posted September 22, 2021 Share Posted September 22, 2021 Hi, I found this: https://github.com/PrestaShop/PrestaShop/issues/9757 How do you fix it? in fact the apple is a gift, but it does not seem, the customers are bewildered by this visualization. also in the cart summary: any comments are appreciated. Balla Link to comment Share on other sites More sharing options...
ballashop Posted September 22, 2021 Author Share Posted September 22, 2021 I try to follow Hlavtox by editing the following files: classes/controller/FrontController.php Find assignGeneralPurposeVariables function. Change 'cart' => $this->cart_presenter->present($this->context->cart) to 'cart' => $this->cart_presenter->present($this->context->cart, true), src/Adapter/Presenter/Cart/CartPresenter.php Find present function. Change if ($shouldSeparateGifts) { $rawProducts = $cart->getProductsWithSeparatedGifts(); } else { $rawProducts = $cart->getProducts(true); } to $rawProducts = $cart->getProducts(true); Add this right before return if ($shouldSeparateGifts) { $rawProducts = $cart->getProductsWithSeparatedGifts(); $products = array_map([$this, 'presentProduct'], $rawProducts); $products = $this->addCustomizedData($products, $cart); } the image shows the change unfortunately the gift is not clear in the cart summary and in the email that the customer receives. Thanks for any reply. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now