Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to Change Action of “Edit” link in Cart Page
 
Jennii
Jr. Member
 
Total Posts:  9
Joined:  2013-03-13
 

Hi there!

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.
Therefore:
- 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:

<td class="a-center">
        
<?php if ($isVisibleProduct): ?>
        
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit'?></a>
        
<?php endif ?>
    
</td>

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!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top