Question

I was trying to make an script to reload the page when i delete a product from mini-cart. The reason is because when i delete a product from it, if i am on the onestepcheckout, my summary don´t get reloaded, so i need to reload the full page to get again the price and the new shipping costs.

I see that btn-closeappear on default.phtml on sns_ajaxcart, but with this sencente, i dont know what i have to do the reload after the onclick makes the changes on the cart.

This is my Element <a>

<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php //echo $this->__('Remove This Item') ?></a>

Any idea?

Was it helpful?

Solution

I have tested this on clean RWD template.

Line 158 replace:

<a href="<?php echo $this->getAjaxDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>" data-confirm="<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>" class="removex">
<?php echo $this->__('Remove Item') ?>
</a>

with

<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>" onclick="return confirm('<?php echo Mage::helper('core')->quoteEscape($this->__('Are you sure you would like to remove this item from the shopping cart?'), true) ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>

It is working on every page, when you remove an item it refresh the page.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top