Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Created October 21, 2011 15:16
Show Gist options
  • Save amacgregor/1304095 to your computer and use it in GitHub Desktop.
Save amacgregor/1304095 to your computer and use it in GitHub Desktop.
Delete Product Custom options
<?php
/**
* Created by JetBrains PhpStorm.
* User: amacgregor
* Date: 10/21/11
* Time: 12:38 PM
* To change this template use File | Settings | File Templates.
*/
require_once 'app/Mage.php';
umask(0);
Mage::app();
$id = 39;
$product = Mage::getModel('catalog/product')->load($id);
$options =$product->getOptions();
foreach ($options as $option)
{
if ($option->getTitle() == $optionTitle) :
unset($this->_options[$option->getId()]);
break ;
endif;
}
//$product->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment