php 如何在 Magento 中创建特定产品的优惠券?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5338305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create a coupon on specific product in Magento?
提问by éricP
Let's say I have 10% off coupon code.
This coupon is applicable only to Product B
假设我有 10% 的优惠券代码。
此优惠券仅适用于产品B
A customer have in its cart :
一位顾客的购物车中有:
- Product P1
- Product B
- Product P2
- 产品 P1
- 产品B
- 产品P2
I don't want my 10% off coupon apply to other product but only to Product B.
我不希望我的 10% 优惠券适用于其他产品,而仅适用于产品 B。
Do you know?how I can do that within Magento?
你知道吗?我怎么能在 Magento 中做到这一点?
回答by Mukesh Chapagain
Here is the process to create Coupon Codefor any particular product:-
以下是为任何特定产品创建优惠券代码的过程:-
- Login to Admin
- Go to Promotions -> Shopping Cart Price Rules
- Click Add New Rule
- Fill Rule Information
- 登录到管理员
- 前往促销 -> 购物车价格规则
- 单击添加新规则
- 填写规则信息
Set Conditions
设置条件
- On left sidebar, click Conditionstab
- Click + button icon
- Select Product attribute combination
- Click + button icon
- Select SKU
- Now, you will see SKU is ...
- Put your product SKU over there
- 在左侧边栏上,单击条件选项卡
- 单击 + 按钮图标
- 选择产品属性组合
- 单击 + 按钮图标
- 选择SKU
- 现在,您将看到SKU 是...
- 将您的产品 SKU 放在那里
Please notethat the SKU option may not show up by default.(Go to: catalog -> attributes -> manage attributes. Then search for the ‘SKU' attribute and set the drop down ‘Use for Promo Rule Conditions' to YES and reindex if needed.)
请注意,默认情况下可能不会显示 SKU 选项。(转到:目录 -> 属性 -> 管理属性。然后搜索“SKU”属性并将下拉菜单“用于促销规则条件”设置为“是”,并在需要时重新编制索引。)
Set Actions
设置操作
You can set how much discount you want to give from here
Save Rule
您可以从这里设置您想提供多少折扣
保存规则
回答by Kamesh Jungi
Also as extra information, if you not found SKU in promotion tab you can do following.
另外作为额外信息,如果您没有在促销选项卡中找到 SKU,您可以执行以下操作。
Go to: catalog -> attributes -> manage attributes
转到:目录 -> 属性 -> 管理属性
Search for the ‘SKU' attribute and set the drop down ‘Use for Promo Rule Conditions' on YES.
搜索“SKU”属性并将下拉“用于促销规则条件”设置为“是”。
That will solve the problem.
这将解决问题。
回答by Michael Roh
They are not exact answer for the question. Most of all the right but you have to setup one more thing as below if you want to discount only specific items or specific items in category.
他们不是这个问题的确切答案。最重要的是,如果您只想打折特定商品或类别中的特定商品,您必须再设置一件事,如下所示。
- Do it as above
under Shopping Cart Price Rule - Go to Conditions > Remove all conditions
Go to Actionsand setup under "Apply the rule only to cart items matching the following conditions (leave blank for all items)"
- If you want to discount specific items, select SKU and input the SKU #
- If you want to discount Category items, select category
根据购物车价格规则执行上述操作- 转到条件 > 删除所有条件
转到“仅将规则应用于符合以下条件的购物车项目(所有项目留空)”下的操作和设置
- 如果要打折特定商品,请选择 SKU 并输入 SKU #
- 如果您想打折分类商品,请选择分类
It will be discounted only setup items even if other items are in the cart.
即使购物车中有其他商品,它也只会打折设置商品。
回答by Vigna S
- Login to Admin
- Go to Promotions -> Shopping Cart Price Rules
- Click Add New Rule
- Fill Rule Information
- 登录到管理员
- 前往促销 -> 购物车价格规则
- 单击添加新规则
- 填写规则信息
Under Actions :
在操作下:
- In Apply the rule only to cart items matching the following conditions (leave blank for all items)
Click on + button, under that select SKU
Now, you can see SKU is ...
- Put your product SKU over there
- 在将规则仅应用于符合以下条件的购物车项目(所有项目留空)
单击 + 按钮,在该按钮下选择 SKU
现在,您可以看到 SKU 是...
- 将您的产品 SKU 放在那里
The SKU option wont be there in default, to add that
默认情况下不会有 SKU 选项,添加
Catalog -> attributes -> manage attributes Find SKU
目录 -> 属性 -> 管理属性 查找 SKU
Set "Use for Promo Rule Conditions" to Yes
将“用于促销规则条件”设置为是
回答by Ventus
Go to your shopping cart rules in Admin Panel of Magento. When you create new rule, under conditions tab you have great options to set.
转到 Magento 管理面板中的购物车规则。创建新规则时,在条件选项卡下,您可以设置很多选项。
For example you can that this rule will apply only to products of a one category, or product which has defined attribute.
例如,您可以将此规则仅适用于一个类别的产品,或具有定义属性的产品。
You should check those option, because Magento has many possibilities here.
您应该检查这些选项,因为 Magento 在这里有很多可能性。