Jump to content

Error if customer tries using coupons


Steqal

Recommended Posts

If a customer tries to sumbit a coupon the following error appears:

Fatal error: Call to undefined method Cart::getOrderedCartRulesIds() in /homepages/5/d91252996/htdocs/clickandbuilds/PrestaShop/Presta/override/classes/CartRule.php on line 56

     

Code-Snippet -> Line 56 -> $all_cart_rules_ids = $context->cart->getOrderedCartRulesIds();

		/*CleanPresta Adding*/
		$productCharge = (int)Configuration::get('TCHARGE_PRODUCT'); //product ID
		foreach($package_products as $key=>$pd){
			if($pd['id_product'] == $productCharge) {
				unset($package_products[$key]);
			}
		}
		/*CleanPresta Adding*/
		
$all_cart_rules_ids = $context->cart->getOrderedCartRulesIds();

        $cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS);
        $cart_amount_te = $context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS);

        $reduction_value = 0;

        $cache_id = 'getContextualValue_'.(int)$this->id.'_'.(int)$use_tax.'_'.(int)$context->cart->id.'_'.(int)$filter;

 

Maybe someone has a solution / it never worked so far.

 

Best regards and thanks in advance

 

Jens

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...