Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
class B { | |
protected $c; | |
public function __construct(C $c) { | |
$this->c = $c; | |
} | |
} | |
class C {} |
for i in `find . -type f | grep -v \.git | grep -v "^.$" | grep -v "modman" | sed 's/\.\///'`; do echo ${i} ${i}; done > modman |
delimiter ;; | |
drop procedure if exists build_catalog;; | |
create procedure build_catalog(IN categories INT, IN products INT) | |
begin | |
SET @category_count = 1; | |
SET @CATNAMEPREFIX = "Category "; | |
SET @CATURLKEYPREFIX = "cat-"; | |
SET @CATURLPATHPREFIX = "catpath-"; | |
SET @ROOTCATEGORY = 2; | |
SET @INCLUDEINMENU = 1; |
We upgraded to 1.8 a couple of weeks ago, today i had to investigate this little gem:
The issue was reproducable by adding 3 of the above items to the cart, checking the db confirmed that the 2nd quote item already had the wrong tax value.
Digging down the culprit turned out to be in Mage_Tax_Model_Sales_Total_Quote_Subtotal and Mage_Tax_Model_Sales_Total_Quote_Tax:
collect() will call for each quote item:
The idea is to use gamification in the Magento backend to help to train admins who are new to using Magento with some kind of interactive tutorial along with earning points for doing things like updating their store address in system config and creating a new product, etc.
Not totally sure, just a rough idea right now. But my thinking is - some combination of an interactive tutorial with points and badges earned for different actions.
<?php | |
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);} |
select customer_id, email, f.value, l.value, amount from enterprise_customerbalance b join customer_entity c on | |
b.customer_id=c.entity_id | |
left join customer_entity_varchar f on c.entity_id =f.entity_id | |
left join customer_entity_varchar l on c.entity_id =l.entity_id | |
where amount>0 and f.attribute_id=5 and l.attribute_id=7 |
<?xml version="1.0"?> | |
<config> | |
<frontend> | |
<events> | |
<!--disable logs--> | |
<controller_action_predispatch> | |
<observers><log><type>disabled</type></log></observers> | |
</controller_action_predispatch> | |
<controller_action_postdispatch> | |
<observers><log><type>disabled</type></log></observers> |