Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $opts = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
- $newOptions = array();
- foreach($opts['options'] as $ops) {
- if ($ops['label'] == "Square Ft") {
- $ops['value'] = $actualSqFt;
- $ops['print_value'] = $actualSqFt;
- $ops['option_value'] = $actualSqFt;
- }
- $newOptions[] = $ops;
- }
- $opts['info_buyRequest']['options'][$optionId] = $actualSqFt;
- $opts['options'] = $newOptions;
- $item->setProductOptions($opts);
- $item->save();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement