Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$options = $proxy->catalogProductAttributeOptions($sessionId, '23');
foreach ($options as $opt) {
if ($opt['label'] == 'yellow') {
$color = $opt['value'];
}
}
if (!isset($color)) {
$color = $proxy->catalogProductAttributeAddOption('23','yellow');
}
$options = $proxy->catalogProductAttributeOptions('24');
foreach ($options as $opt) {
if ($opt['label'] == 'XL') {
$size = $opt['value'];
}
}
if (!isset($size)) {
$size = $proxy->catalogProductAttributeAddOption('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.