Magento:在产品视图页面中进行追加销售
您好,我有一个自定义模板,我想将加售添加到其中。我已经成功地完成了相关项目,但在追加销售方面遇到了麻烦。
这是我的catalog.xml:
<catalog_product_view translate="label">
...
...
<reference name="content">
...
...
<block type="catalog/product_list_related" name="catalog.product.related" template="catalog/product/list/related.phtml"/>
<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>
这是我的view.phtml 文件:
<div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="">
<?php echo $this->getChildHtml('catalog.product.related'); ?>
</div>
<div id="tabs-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" style="">
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
这似乎应该是直接且有效的,但事实并非如此。
我还记得创建追加销售产品;)
非常感谢任何帮助,
比利
Hi I have a custom template that I want to add upsells into. I've successfully done it with related items but am having trouble with my upsells.
Here's my catalog.xml:
<catalog_product_view translate="label">
...
...
<reference name="content">
...
...
<block type="catalog/product_list_related" name="catalog.product.related" template="catalog/product/list/related.phtml"/>
<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>
And here is my view.phtml file:
<div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="">
<?php echo $this->getChildHtml('catalog.product.related'); ?>
</div>
<div id="tabs-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" style="">
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
This seems as though it should be straight forward and work but it hasn't.
I've also remembered to create upsell products ;)
Any help most appreciated,
Billy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试移动
到内部,
例如:
Try to move
inside
for example:
查看页面上的交叉销售代码图像
如果任何人仍然不清楚他们可以看到上面是catalog.xml 文件的图像快照,可以清楚地了解在哪里添加代码。
cross sell code image on view page
if it still it not clear to any one they can see the above image snapshot of catalog.xml file to have a clear idea where to add the code.