Question

please visit this link : http://hotwheelstoys.in/mobileapp2/funny-pets-wonder-teddy-1802.html

there is an option to enter the zip code and check there is

"delivery available or not to that zip code".

once we entered the zip code and click on "check" button, it will display

the paticular message below the text field.

but once we entered the pin code and clickon "check" button, i want to hide the text field and want to display the message as like

: http://www.flipkart.com/peacock-basic-architect/p/itmdzdt44rzemzjf?pid=BLCDCYYHKPY9UVMG&ref=L%3A7578364719676933414&srno=p_1&query=peacock&otracker=from-search

we are using this code : http://pastebin.com/t6y6vyQe

please help me to find solution

thanks in advance

Was it helpful?

Solution

First thing you have hide the delivery zipcode block. So on the AJAX success function you have to write the code to hide the div

$('block_info').hide();

before that use <div id="delivery-html"> and <div id="delivery-message"> outside of the <div id="block_info">

Now if the customer want to change the zipcode

So add the <a> after the <div id="delivery-html"> and use the below script

Event.observe('delivery-pincode-change', 'click', function(event){
         $('block_info').show();
         $('delivery-message').hide();               
         $('delivery-html').hide();
});

You can use this code

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