Post by edi1212 » Sat Apr 18, 2015 4:04 pm

Hi all,
Because of specific target of the shop I'm preparing I have to remove some fields from checkout.
For example I have to remove (or at least hide) Company field.
But when I'm removing it from the form or setting input type = hidden, in Step 3 I got the json error:

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: company in <b>/var/www/html/opc2.2/catalog/controller/checkout/guest_shipping.php</b> on line <b>172</b>[]
This is the most important thing to me.


I would also love to add two select fields taking lists of values from the database - I want it work just like country/zone pair. This is less important but it would help me a lot as well.

I would appreciate your help a lot. Thanks.

Newbie

Posts

Joined
Mon Apr 13, 2015 11:28 pm

Post by OSWorX » Sat Apr 18, 2015 4:48 pm

edi1212 wrote:Hi all,
Because of specific target of the shop I'm preparing I have to remove some fields from checkout.
For example I have to remove (or at least hide) Company field.
But when I'm removing it from the form or setting input type = hidden, in Step 3 I got the json error:

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: company in <b>/var/www/html/opc2.2/catalog/controller/checkout/guest_shipping.php</b> on line <b>172</b>[]
This is the most important thing to me.


I would also love to add two select fields taking lists of values from the database - I want it work just like country/zone pair. This is less important but it would help me a lot as well.

I would appreciate your help a lot. Thanks.
Only hiding or deleting some fields is not enough.
You have also to disable the validation rules in the controller.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PaulSketo » Tue May 26, 2015 3:03 pm

Why wont you delete the lines in the tpl file?

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by IP_CAM » Wed May 27, 2015 12:03 am

YOU COULD just use the Company Field for another Purpose, just like a FAX Field can be (mis-)used for different purposes. It woule be much more easy, compared with TRYING to add another VALUE. Some Mod's exist, at least for v.1.5.6.x, to achieve such 'Stuff'!
---
AND, just to repeat it, once in a while, you could possibly used it:

One simple way to HIDE certain Registration Sections, especially those, beeing REQUIRED to contain a valid VALUE, in order to make registration work. In Addition, there are 4'200+ DataBase Lines, related to Country/Zone-Selections, fully ignored, if you don't use them, but existent, therefore acting, at best, as brake, if you do not plan to ever use your Shop on a Multi-National Scale. For me, it's just like carrying a 100kg spare Load in my Car-Trunk. For nothing. Exept for using more Fuel, wherever I drive... :-\

ht[url]tp://forum.opencart.com/viewtopic.php?f=190&t=136422[/url]
http://forum.opencart.com/viewtopic.php?f=110&t=136777

Both THINGS are installed here, among a few other little Gizmo's, and according to Performance-Test Sites, my latest 16K-Product TestShop is doing quite s ;) well.

http://www.bigmax.ch/os/index.php?route ... ry&path=25

It's NOT OC v1.5.x-related, either, it can be done on OC v.2.x as well.

BUT, as you see, other Places exist, as well, where Country/Zone Pre-Selectiopn would have to be done, to make it work perfect. I just wanted to give you a basic Idea on it!

Good Luck ;)
Ernie
bigmax.ch/os/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 2 guests