我需要放下相互连接的下拉菜单,例如Truck Brand,Truck Model,Model Years.
所以Brand会有一个下拉列表.其中包含Truck Brands的所有属性选项.选择品牌后,将显示另一个下拉列表,其中包含卡车模型的属性选项,但针对该特定品牌进行过滤.选择模型后,年份下拉列表将包含该品牌和型号的过滤年份.我是Magento的新手,我可以通过php使用获取属性及其选项
$attributeId = Mage::getResourceModel('eav/entity_attribute')
->getIdByCode('catalog_product','attribute_code_here');
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
$attributeOptions = $attribute ->getSource()->getAllOptions();
Run Code Online (Sandbox Code Playgroud)
但是我没有在第一个属性上得到过滤的属性选项.并且特别使用ajax.
一般流通中有八个硬币:
1p,2p,5p,10p,20p,50p,$ 1(100p)和$ 2(200p).
可以通过以下方式赚2美元:1x $ 1 + 1x50p + 2x20p + 1x5p + 1x2p + 3x1p
使用任意数量的硬币可以用3种不同的方式制作3美元?
我们怎样才能用PHP做到这一点?