I just updated to 1.8.0.4 and I keep getting Unable to register extension "Twig_Fuel_Extension" as it is already registered. I was able to override Twig_Fuel_Extension in the previous version but now I can't and my app is broken.
Could you open a new topic for the "ajax problem", and explain exactly what you do, what the expected result is, and what the actual result is? Because I don't have a clue.
I'm back again lol. I have a very weird error that cannot be explained. It's a PHP error so I don't want to create a new issue for that.
$a = $value['details'];
$b = $a['discount'];
$dp = $b['price'];
$da = $a['amount'];
if ($dp) {
$amount = $dp;
}
else {
$amount = $da;
}
die(var_dump($dp)) gives me the appropriate result which means $amount should also have an appropriate value. When I remove the die statement and I try to insert $amount inside my db query I keep getting the error index 'discount' does not exist. This is a weird issue because index 'discount' f***ing exists but PHP is just too dumb to see it lol.
Pardon my language, I've been battling with this weird error since and I'm now pissed off 'cos I have other things to do.
The problem was that one of the product inside the array had no discount node (I didn't add discount node for products without discount). In Python $value['details']['discount']['price'] ? would have returned false (instead of throwing an error) for the product without a discount, which was what I was expecting, but unfortunately things don't work like that in PHP that's why it keeps telling me that no index discount. I just needed to add the discount node but set price to 0 for product with no discount.