Created
August 2, 2017 07:45
-
-
Save netzkollektiv/33e88d7be2724b527682ea5e9e36f9a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$options = $proxy->call($sessionId, 'catalog_product_attribute.options', array('23')); | |
foreach ($options as $opt) { | |
if ($opt['label'] == 'yellow') { | |
$color = $opt['value']; | |
} | |
} | |
if (!isset($color)) { | |
$color = $proxy->call($sessionId, 'catalog_product_attribute.addOption', array('23','yellow')); | |
} | |
$options = $proxy->call($sessionId, 'catalog_product_attribute.options', array('24')); | |
foreach ($options as $opt) { | |
if ($opt['label'] == 'XL') { | |
$size = $opt['value']; | |
} | |
} | |
if (!isset($size)) { | |
$size = $proxy->call($sessionId, 'catalog_product_attribute.addOption', array('24','XL')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment