Post by neeiro » Wed May 22, 2013 5:19 pm

Hi,

Does anyone know any extensions or code changes that allows the user to remove a product option from the cart. I'm working on a site where the client wants the user to be able to remove it so that they dont have to remove the whole product and re-buy the item.

I can't seem to find an extension that does this, Is this possible without major code changes?

Opencart Version 1.5.5.1
with Universum Pro Template

Thanks

Neil.

Newbie

Posts

Joined
Fri Mar 22, 2013 10:28 pm

Post by Qphoria » Thu May 23, 2013 1:44 am

This would be quite difficult to do.

OpenCart uses an md5 hash for a product with options for the session value. This makes it easy to ensure that if you have something like:

Tshirt
- Large
- Black

Tshirt
- Large
- Red

That they are considered different products. Since the option id's would be different, it would generate a different md5 hash. So if you add a second Tshirt with Large and Red, it won't update the qty for the one with the Large Black.

Since this is encoded into a hash, it isn't something that can be altered or decoded.

I did start a mod that was aimed at allowing you to "change" the options from the cart page which ultimately would have included the option to drop an option.. but this is the issue I ran into and haven't taken the time to revisit it.

Not to say it isn't possible.... but a likely tedious job that wouldn't be work the development cost unless you really were dying to have this.

Off the top of my head, one option would be to do some behind-the-scenes magic where the entire item was deleted, but then re-added without the chosen option. That would require more persistence of the option ids for the product. This is compounded by the option required flag on whether or not it is allowed to have this item without a particular option.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by daik01 » Thu May 30, 2013 3:45 am

It costs me a few day programming, but finally got the extension to work :

http://www.opencart.com/index.php?route ... n_id=12012

it has not the delete button, because many options are required, so what to do if they stay in the cart. The customer will jump to the product page, with it's filled settings. When it hits the add to cart button, the product in the cart will be changed with the new settings.

I think this was the most friendly way to solve it.

TOP 5 Opencart Extensions:
1:Opencart Reservations
2:Stock Report, import/export stock levels with Excel
3:3D Carousel
4:Product Price Changer by Category
5:Set price Inclusive Taxes
DEMO SHOP


Active Member

Posts

Joined
Sun Oct 21, 2012 3:18 am

Who is online

Users browsing this forum: No registered users and 23 guests