0

I am overwriting Mage_Checkout module to local as Myshop_Checkout.I almost did and worked perfect.

And in Mage_Checkout i want to change this code,and i dont like to use secure_url.

1.Mage_Checkout original

<secure_url>
        <wishlist>/wishlist/</wishlist>
</secure_url>

To avoid secure url I edited in core magento like this,

2.Mage_Checkout edited

<!-- <secure_url>
        <wishlist>/wishlist/</wishlist>
    </secure_url>-->
<wishlist>/wishlist/</wishlist>

From above, core magento use secure i want wishlist as normal http://.

  • If you do not wish to use SSL at all, why not define the secure url as being http:// instead of https:// - that way you could leave the code as is and also if you chose to use SSL later, it would simply work by editing the secure URL? – tecjam Nov 20 '14 at 13:07
  • @tecjam i only want to change for this module only.I dont want to change for whole. – Manikandan Arunachalam Nov 21 '14 at 12:06
  • 1
    Thanks for clearing that up. Maybe have a look at this: blog.goods-pro.com/1792/… – tecjam Nov 21 '14 at 12:28
2

Try adding this in the config.xml of your module:

<config>
    ....
    <frontend>
        <secure_url>
            <wishlist>/some-text-here-that-is-not-an-url/</wishlist>
        </secure_url>
    </frontend>
    ....
</config>

And in the app/etc/modules/Myshop_Checkout.xml make your module depend on the Mage_Wishlist module.
This way, when the config files are merged, the secure_url/wishlist tag is overwritten and magento will match your urls against some-text-here-that-is-not-an-url instead of wishlist. This will always be false, so the wishlist will not be on a secure url anymore.

  • i'll give this a try, but i wanna confirm my wish, I just dont want secure_url so i would like to overwrite core magento config to my local.Does your answer solve this? – Manikandan Arunachalam Nov 21 '14 at 12:20
  • not sure I understand. You want only your wishlist page not to be on a secure url? If so, then this answer should solve the problem. Login, register and checkout will still be on a secure page if you have the secure pages enabled. Cloning the config.xml file to the local folder may not solve the issue. – Marius Nov 21 '14 at 12:27
  • No I want wishlist on secure_url too, but not https:// only http:// routing is needed. – Manikandan Arunachalam Nov 21 '14 at 12:29
  • 1
    I think it's the right way to do it. No core hacks. That's the reason the secure urls are declared like that. So you can add them and change them. Unfortunately there is no way to remove url from the secure list. So changing one url to something that does not exist is the only way to go. – Marius Nov 21 '14 at 13:01
  • 1
    @Manik. I already gave you an explanation. But here are some more words. There are 2 aspects. 1. Magento checks the urls that should be secured against all the urls from the config section that match this xpath: config/frontend/secure_url. 2. All the config.xml files are merged into one big xml file and that one is used. This approach allows you to add stuff to any xml node or override existing nodes. When loading a new config.xml if a node is already present in the big merged xml, that node is overwritten by the new one. This is what happens with the code I posted. – Marius Nov 24 '14 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.