Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.