Default location such as, feel not beautiful
After adjustment, such as
Open the Background product page and find the display product options in property under Design, you can see two options: Product Info column and block after Info column, where block after is selected by default Info column, which is literally understandable, the content of options is displayed below the product information by default, and if the display product options in property is set to the products info Column, The front desk will see the effect of the second picture. That is, the Magento system itself provides two display locations for this piece, which can be chosen by modifying the property values in the background, but the problem is that if I want the options for all products to appear by default in the product Info Column, Instead of all the products opened to change the properties, it is necessary to modify the code to achieve.
Open the main template file for the product page view.phtml, you can see similar code on both ends, the first one is as follows
1<?phpif($_product->issaleable () &&$this->hasoptions ()):?>2<?phpif($container 1_html=$this->getchildchildhtml (' Container1 ', ',true,true)):?>3<divclass= "Container1-wrapper" ><?phpEcho $container 1_html;?></div>4<?phpendif;?>5<?phpendif;? >
A second
1<?phpif($_product->issaleable () &&$this->hasoptions ()):?>2<?phpif($container 2_html=$this->getchildchildhtml (' Container2 ', ',true,true)):?>3<divclass= "Box-additional <?php Echo$grid[' Cont2col '];?> ">4<divclass= "Container2-wrapper" ><?phpEcho $container 2_html;?></div>5</div>6<?phpendif;?>7<?phpendif;?>
These two paragraphs are the product Info column and the block after Info column two locations, from the location of the code in the view.phtml can be seen, the background is the default block after Info column case, Information will be displayed in Container2. Now cut container2 this piece of code, put it in the same position as container1, so that the new product by default, the options will be displayed in the second picture shows the location, the template file in the final code is as follows:
1<?phpif($_product->issaleable () &&$this->hasoptions ()):?>2<?phpif($container 1_html=$this->getchildchildhtml (' Container1 ', ',true,true)):?>3<divclass= "Container1-wrapper" ><?phpEcho $container 1_html;?></div>4<?phpendif;?>5<?phpendif;? >6<?phpif($_product->issaleable () &&$this->hasoptions ()):?>7<?phpif($container 2_html=$this->getchildchildhtml (' Container2 ', ',true,true)):?>8<divclass= "Box-additional <?php Echo$grid[' Cont2col '];?> ">9<divclass= "Container2-wrapper" ><?phpEcho $container 2_html;?></div>Ten</div> One<?phpendif;?> A<?phpendif;?>
Magento Adjust Product detail Page customization options or the location of configuration items