I am not a programmer, just a shop owner with some limited programming knowledge gained via forums and testing on my dev sites over the years. I really like Magento and its possiblities and am setting up an alternate shop so I can do a sort of A/B testing with my existing Virtuemart store to see what my customers prefer.
Using these forums I was able to figure out how to change the way Grouped Items show up on the product page by altering the view.phtml & grouped.phtml files and placing them in the appropriate folder in /app/design/frontend/default/my_theme/.... However, all the changes I have made to the view.phtml file now also apply to all other product types (simple, bundled etc)
I attempted renaming view.phtml file to 2view.phtml in my folder structure and added a custom layout update in the Design section of the grouped product I want it to apply the change to by using the following code:
which if I have read the forums correctly should call the 2view.phtml file for this particular piece, but I get the following error
<block type="catalog/product_view" name="product.info" template="catalog/product/2view.phtml">
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 445: parser error : Opening and ending tag mismatch: block line 444 and reference in /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 235
#0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/home/relicons/...', 235, Array)
#1 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Model/Layout/Update.php(235): simplexml_load_string('asSimplexml()
#3 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Model_Layout->generateXml()
#4 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(101): Mage_Core_Controller_Varien_Action->generateLayoutXml()
#5 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(125): Mage_Catalog_ProductController->_initProductLayout(Object(Mage_Catalog_Model_Product))
#6 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(349): Mage_Catalog_ProductController->viewAction()
#7 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch('view')
#8 /home/relicons/domains/relicons.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home/relicons/domains/relicons.com/public_html/app/Mage.php(447): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home/relicons/domains/relicons.com/public_html/index.php(46): Mage::run()
Can anyone help and tell me what I am doing wrong? Am I missing a step somewhere? Am I going about this in the wrong way? Is there a way to call 2 different view.phtml files depending on what type of product is being viewed?
So i would want Magentoâs regular view.phtml file to be called for all types of products except Grouped products where I would need 2view.phtml file to be called. I don’t mind doing this through the Custom Layout Update of every grouped product i add if I could find a way to do it.
Is this possible? If so can someone point me in the right direction?
Thanks in advance for any help you can provide as this would be the last alteration I need done before adding products and taking the site live.