根据目录价格规则获取产品列表
假设我创建了一个价格规则,所有价格超过 1000 卢比的产品都将获得 30% 的折扣。现在我应该做什么来列出目录价格规则下的那些产品
suppose i have created a price rule that all product which have price more than Rs.1000 they will get 30% off. Now what i should do to make a list of those product which are under that catalog price rule
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很奇怪的是,确实没有简单的功能。我能想到的是以下方法来获取所选产品的所有 id 列表:
仅当规则已应用时才有效。
SELECT DISTINCT Product_id FROM Catalogrule_product WHERE Rule_id=;
,其中将不过可能会有更简单的事情..
Quite odd that there is no simple functionality for that indeed. What I can think of is the following to get a list of all ids of the selected products:
This works only when the rules have been applied already.
SELECT DISTINCT product_id FROM catalogrule_product WHERE rule_id=<id>;
where you replace <id> by the id found in step 1.There might be something easier though..
我一直在寻找同样的东西,找到了以下代码,您可以将其粘贴到 list.phtml 中,它会向您显示特定目录价格规则下的产品:
请务必更改其余的价格规则 id 和 $productsCollection list.phtml 中的代码
如果您能够遵循所有规则,请告诉我,几天来一直在寻找解决方案。
I have been looking for the same thing, found the following piece of code you can paste in your list.phtml and it shows you the products under a particular catalog price rule:
Be sure to change the price rule id and $productsCollection in the rest of the code in list.phtml
Should you be able to pull all the rules please let me know, been looking for a solution for a couple of days now.