开发者

Magento product options with files

开发者 https://www.devze.com 2023-04-03 04:39 出处:网络
In Magento you can you an array of all of the information associated with your cus开发者_开发技巧tom options:

In Magento you can you an array of all of the information associated with your cus开发者_开发技巧tom options:

$selected_option           = $observer->getRequest()->getParams();

However this will display the following for an uploaded file:

[options_1_file_action] => save_new

So, no sign of the file's name or anything. I also tried looping through all the options and values:

$_options                  = $product->getOptions();
foreach ($_options as $o => $_option) {
         $option = $_option['title'];
         Mage::log("Option: ".$option);
         foreach ($_option->getValues() as $value) { 
                  Mage::log(print_r($value->debug(), true));
         }
}

Which will show me the values for fields and dropdowns, but still nothing related to a file. Not even what the file's price can be. Does anyone know how to capture custom options associated with a file. Preferably while doing an event observer of so type.

0

精彩评论

暂无评论...
验证码 换一张
取 消