When user remove the Previously added item from cart, than it will be removed from Database table : sales_flat_quote_item_option, i need similar feature.
Question : once Registered user click on custom button "save design" in product view page , we are creating new row in my_designs table and creating new product and saving product information in database.
once customer click on "add to cart" for that product, we want to remove that product information from "my_designs" table. we want to delete that row.
we are using below code to add the product to cart
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php $collections = $this->getCollection(); ?>
<?php $_product = $this->getProduct(); ?>
<div id="messages_product_view">
<?php $buttonTitle = Mage::helper('core')->quoteEscape($this->__('Add to Cart')); ?>
</div>
<?php foreach ($collections as $key => $product) {
echo $product->getName().' <br>';
?>
<form action="<?php echo Mage::helper('checkout/cart')->getAddUrl($product);?>" method="post">
<div class="add-to-cart-buttons">
<button type="submit" title="<?php echo $buttonTitle ?>" class="button btn-cart" >
<span><span>
<?php echo $buttonTitle ?>
</span></span>
</button>
<?php echo $this->getChildHtml('', true, true) ?>
</div>
</form>
<hr style='display:inline-block; width:100%;'>
<?php
}
?>