What I’m looking to do is change what the action of clicking the “edit” link on a product in the cart does.
Currently, when I click “edit” on a simple product in my cart, it directs the customer back to the simple product’s page. What I want clicking this link to do is direct instead to the configurable product page instead that contains the simple product.
Other considerations going on with this shop setup:
- Configurable products are visible in catalog and search, but simple products are not.
- There are no custom options on any configurable or simple products.
- Entire shop lists configurable products, which each have several variants of simple products within them.
It doesn’t make sense currently if clicking “edit” sends customers to a page of only the simple product, as really, the only editable thing on that page is changing the quantity (which can also be done on the cart page, making this link useless). It would make sense if this directed back to the configurable product page instead, which would give customers the options of other simple products under that same parent as well.
How can I accomplish doing this?
I can see that the code currently calling up the “Edit” link in the cart is the following within the table:
<?php if ($isVisibleProduct): ?>
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
<?php endif ?>
What do I need to change here, and in other areas of code in other cart files, in order to make this link redirection happen?
Thanks in advance for any assistance or guidance!