Post by ravi de silva » Mon Jan 09, 2012 8:56 am

Hello dear members ,
I am doing a site for a gift delivery system , On the delivery address details I need to put the address in a text-area ( So the customers can put their address in their desired manner as the address is going to be in a African country).I thought it would be easier to change the address 2 input box in to a text-area but unfortunately after I have changed it it did not proceed to the next screen .Anyone can help me out on this please ..Is the text-area and input box variables are different ??

Newbie

Posts

Joined
Sat Jan 07, 2012 10:17 pm

Post by MarketInSG » Mon Jan 09, 2012 9:52 am

Code: Select all

<input type="text" name="address_1" value="<?php echo $address_1; ?>" />
change to

Code: Select all

<textarea name="address_1"><?php echo $address_1; ?></textarea>
That's it. Simple as that. The above example is for registering an account.

Regards
MarketInSG


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by ravi de silva » Sat Jan 14, 2012 7:15 am

Hi MarktlnSG , Thanks for your reply but I cannot proceed after do that change ...I am using OC 1.51 .I think I have to change something on the Ajax part on the checkout.tpl I think .But I cannot understand the ajax (Java script ) part at all.I dont know where to change.
And also I NEED TO CHANGE IT ONLY ON THE DELIVERY PAGE !!!.I have attached a picture of it to make it clear ..
Thanks again and please help me ...!!!

Attachments

oc.JPG

oc.JPG (76.88 KiB) Viewed 1915 times


Newbie

Posts

Joined
Sat Jan 07, 2012 10:17 pm

Post by straightlight » Sat Jan 14, 2012 7:29 am

In:
- catalog/view/theme/<your_template>/checkout/address.tpl
- catalog/view/theme/<your_template>/checkout/guest.tpl
- catalog/view/theme/<your_template>/checkout/guest_shipping.tpl
- catalog/view/theme/<your_template>/checkout/register.tpl

file,

find on each files:

Code: Select all

<td><input type="text" name="address_2" value="" class="large-field" /></td>
replace with:

Code: Select all

<td><textarea name="address_2" cols="40" rows="5" class="large-field" /></textarea></td>

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ravi de silva » Sat Jan 14, 2012 8:33 am

Thank you so much for your quick reply ..You are right I have to change it in 2 places .Adreess.tpl and guest_shipping.tpl as I just wanted in delivary .I addition to that I had to put a data type it ajax code of the checkout.tpl ..

data: $('#shipping-address input[type=\'text\'], #shipping-address textarea, #shipping-address select'),
Its working fine now ..Thank you so much again sir....!!!

Newbie

Posts

Joined
Sat Jan 07, 2012 10:17 pm

Post by straightlight » Sat Jan 14, 2012 8:36 am

No problem, enjoy.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by skip » Tue May 13, 2014 9:44 pm

straightlight wrote:In:
- catalog/view/theme/<your_template>/checkout/address.tpl
- catalog/view/theme/<your_template>/checkout/guest.tpl
- catalog/view/theme/<your_template>/checkout/guest_shipping.tpl
- catalog/view/theme/<your_template>/checkout/register.tpl

file,

find on each files:

Code: Select all

<input type="text" name="address_2" value="" class="large-field" />
replace with:

Code: Select all

<textarea name="address_2" cols="40" rows="5" class="large-field" /></textarea>

I do it for checkout/register.tpl and got error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: address_2 in <b>/home/cbithr/public_html/notebook/catalog/model/account/customer.php</b> on line <b>18</b>[

And there is no address.tpl in checkout 1551

Active Member

Posts

Joined
Mon May 09, 2011 9:57 pm

Post by straightlight » Wed May 28, 2014 6:59 am

Code: Select all

/catalog/view/theme/<your_template>/template/account/address_form.tpl
/catalog/view/theme/<your_template>/template/account/register.tpl

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by MarketInSG » Wed May 28, 2014 9:33 am

ravi de silva wrote:Thank you so much for your quick reply ..You are right I have to change it in 2 places .Adreess.tpl and guest_shipping.tpl as I just wanted in delivary .I addition to that I had to put a data type it ajax code of the checkout.tpl ..

data: $('#shipping-address input[type=\'text\'], #shipping-address textarea, #shipping-address select'),
Its working fine now ..Thank you so much again sir....!!!
you will need to do the above in checkout.tpl


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by straightlight » Wed May 28, 2014 11:05 am

/catalog/view/theme/your_template/template/checkout/checkout.tpl

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Google [Bot] and 63 guests