Referencing magento phtml files in a static fashion from WordPress instance works fine but looking to keep the variable scope intact (e.g., showing the cart phtml within WordPress and retaining the values for cart count, etc..).
In the cart phtml:
$_cartQty = $this->getSummaryCount()
Is there a way to keep $_cartQty and the rest of the variables used within the phtml intact when called into WordPress? Or is the best/only option to access those values via Mage::getSingleton/Mage::helper and re-declaring those same variables in order to recreate the needed phtml files in WordPress? The goal is to avoid maintaining two virtually identical cart header pieces.
- The topic ‘Mage enabler phtml inclusion variable scope’ is closed to new replies.