仅限定义的PIN码中的Magento产品可用性?

时间:2015-03-24 08:47:32

标签: php magento e-commerce

我有一个基于Magento的网站,产品仅限于Pin代码集。这些PIN因产品而异。我需要的是在定义产品时获得输入PIN码集的选项。在每个产品页面上都必须有一个文本字段,以检查产品是否可用于访问者输入的PIN码。

1 个答案:

答案 0 :(得分:0)

HI首先为此

1 create a new product attribute with multi-select type 

2 assign all pin codes in there values under attribute options 

3 assign that attribute to the desired attribute set 

4 than for assigning attributes you need to go to product section and assign a desired zip options for that particular product from the multi-select attribute 

5 on product page you need to problematically get all the selected values of that attribute 

6 create a array of that values 

7 create a simple form and when user post some value in that form ,  match that value in the array you defined above. 

8 if the value finds in array than show the cart button and if not do what you want.

我希望这会给你一个非常公平的想法。如果我能为你做任何其他事,请告诉我。

相关问题