Jump to content

[SOLVED] You have given permission to receive your order in recycled packaging.


Recommended Posts

Thanks Stimpy! After reading this fix, I went ahead and submitted a Pull Request at our GitHub website! It makes it so easy to fix these small issues. You can sign up for GitHub, select the appropriate PrestaShop version/ repository , then select the file you wish to edit. Once you edit the code you can submit the pull request for commit. Our Development team will look over the code and merge when appropriate. We already have done multplie merges with community support.

 

Here's the link to github PrestaShop 1.5 https://github.com/PrestaShop/PrestaShop

 

Thanks!

Link to comment
Share on other sites

  • 4 weeks later...

Hello. I modified the file: themes/default/order-detail.tpl and the option isn't show anymore, but in backend (in a test order details that I make) it show the green "V" in recycled packaging. How can I stop to viewing it ? The option is turned off in administration panel, but it seems that when making order during checkout, the "system" automatically activate the recycled packaging.

 

Thanks

PS version: 1.4.7.3

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

  • 3 weeks later...

Hello. I modified the file: themes/default/order-detail.tpl and the option isn't show anymore, but in backend (in a test order details that I make) it show the green "V" in recycled packaging. How can I stop to viewing it ? The option is turned off in administration panel, but it seems that when making order during checkout, the "system" automatically activate the recycled packaging.

 

Thanks

PS version: 1.4.7.3

 

 

This seems also like a bug. I'm using version 1.5.2 and have the same problem. But this happens only ih i place order as guest. If order is placed by registered customer, then order is not saves with recycled packaging flag.

 

Can anyone help?

Link to comment
Share on other sites

Ok, i've made some research...

 

Version 1.5.2

Files /classes/Cart.php and /classes/order/Order.php set the recyclable variable to true per default, like this:

/** @var boolean True if the customer wants a recycled package */

public $recyclable = 1;

 

For some reason, while closing the order as guest, this stays so, even if recycled packaging is disabled in backoffice.

 

Since I don't want to mess with the core files, I have overriden te cart and order classes: edit files /override/classes/cart.php and /override/classes/order/order.php.

 

Overriden cart.php:

<?php

 

class Cart extends CartCore

{

/** @var boolean True if the customer wants a recycled package */

public $recyclable = 0;

}

 

overriden order.php:

<?php

 

class Order extends OrderCore

{

/** @var boolean Customer is ok for a recyclable package */

public $recyclable = 0;

}

 

 

Now it works like it should.

Link to comment
Share on other sites

×
×
  • Create New...