Questions tagged «file»

2
以编程方式生成xml文件
我需要.xml从扩展名生成文件。里面的Namespace/Module/view/adminhtml/ui_component/文件夹 我需要以语法方式进行此操作,因为该.xml文件将基于数据收集生成,有没有办法做到这一点?
8 magento2  xml  file 

1
请指定产品所需的选项“自定义选项”类型文件
我只有一个自定义选项,即文件类型,我试图通过编程方式将产品添加到购物车,如下所示: $logoSku = 'lg-brnd01'; $productLogo = Mage::getModel('catalog/product')->loadByAttribute('sku',$logoSku); $logoOptions = $productLogo->getOptions(); $opts = Mage::getSingleton('catalog/product_option')->getProductOptionCollection($productLogo); $i =0; $cart = Mage::getModel('checkout/cart'); $cart->init(); $params = array( 'product' => $productLogo->getId(), 'qty' => 1, 'form_key' => Mage::getSingleton('core/session')->getFormKey(), ); foreach ($opts->getData() as $data) { $optionId = $data['option_id']; $image = $paths[0]['name']; $options = array( $optionId => array( 'type' …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.