Post by Joyt » Mon Nov 04, 2019 5:27 pm

Hello,
I am using OpenCart version 3.0.2.0 to develop my site. I want to add an extra field (Phone number) on Checkout page for Delivery details (This appears when delivery and billing addresses are different).

Can you help me to resolve this issue?

Thanks in advance.

Newbie

Posts

Joined
Mon Nov 04, 2019 5:15 pm

Post by OSWorX » Mon Nov 04, 2019 7:28 pm

OpenCart per default has already one filed for phone number.
If you need an additional field, you can achieve that with a "custom field".

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


User avatar
Guru Member

Posts

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

Post by Joyt » Tue Nov 05, 2019 5:38 pm

Hello,
Thank you for reply.
Can you tell me steps to add custom field on Checkout page (front end) for Delivery details?

Thanks in advance.

Newbie

Posts

Joined
Mon Nov 04, 2019 5:15 pm

Post by OSWorX » Tue Nov 05, 2019 9:35 pm

Backend > Menu >> Customer >> Custom Fields

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


User avatar
Guru Member

Posts

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

Post by Joyt » Wed Nov 06, 2019 12:19 pm

Hello,
I have checked with the above steps you have mentioned. The field does not appear on Checkout page.
Instead of front end, it appears in Admin side (customer -> Edit customer -> Address1).

But, while creating Custom field, if I select Account (location of custom field), it appears on Register page (front end).

Do I need to write a VQMod for this?

Thanks in advance.

Newbie

Posts

Joined
Mon Nov 04, 2019 5:15 pm

Post by OSWorX » Wed Nov 06, 2019 12:50 pm

First of all, when you use OpenCart 2.x or 3.x you do NOT have to use VQMod.
All can be released with the already integrated OCMod (slightly different syntax).
Or (but not always possible) with an event.

In your case, you have to create a extension, because as far as I can see, you want to store that additional field (phone number).
And to do so, you need an extra database table (never touch existing tables!).

Second, based on your logic, you have to check if addresses are different.
And third, you have to add the output to your template.

All could be done with an extension as OCMod, but simplier with a new and extra extension (the more if you want to have that also when you update the store).

This is how I would do it.

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


User avatar
Guru Member

Posts

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

Post by Joyt » Wed Nov 06, 2019 1:40 pm

Okay I will search for an extension OCMod.

Thank you so much for your help. :)

Newbie

Posts

Joined
Mon Nov 04, 2019 5:15 pm

Post by OSWorX » Wed Nov 06, 2019 2:04 pm

Joyt wrote:
Wed Nov 06, 2019 1:40 pm
Okay I will search for an extension OCMod.
Guess you will not find any ready for this purpose.

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


User avatar
Guru Member

Posts

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

Post by Joyt » Wed Nov 06, 2019 7:08 pm

I just want to confirm this: So in Opencart, if you want to add a phone number (or any other extra field) on the Checkout page in Delivery details section, it's possible only through an OCMOD?
If yes, what's a "Custom field" used for?

Newbie

Posts

Joined
Mon Nov 04, 2019 5:15 pm

Post by OSWorX » Wed Nov 06, 2019 8:33 pm

Joyt wrote:
Wed Nov 06, 2019 7:08 pm
I just want to confirm this: So in Opencart, if you want to add a phone number (or any other extra field) on the Checkout page in Delivery details section, it's possible only through an OCMOD?
No, you can also install an extension (if it would exist ..).

The difference: an ocmod is a simple modification (or should be, because I know some which are more an extension rather an OCMod modification) which change only a few lines.
The name OCMod explained:
1. forked from VQMod (Virtual Qphoria Modification)
2. OpenCart Modification
Joyt wrote:
Wed Nov 06, 2019 7:08 pm
If yes, what's a "Custom field" used for?
Also no (if you already discovered by yourself).
A so called "Custom Field" are additional fields used either for further account or address fields only.

But what you want (and need) cannot be done with those "custom fields", because you want to have it during the checkout process (what if customer is already registered and therefore does not update his "custom fields"?).
And want to use them later for ??
I want to add an extra field (Phone number) on Checkout page for Delivery details (This appears when delivery and billing addresses are different).
I already did asked you (I guess) where do you want to see this additional field(s)?
You also need some logic to check the difference between billing and delivery address.
And you have to store those additional fields in a seperate database table (also already answered).

So to sum up: hire a professional or post a request for that in the commercial section of this forum.

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


User avatar
Guru Member

Posts

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

Post by jeefins » Sat Apr 16, 2022 4:42 pm

Joyt wrote:
Mon Nov 04, 2019 5:27 pm
Hello,
I am using OpenCart version 3.0.2.0 to develop my site. I want to add an extra field (Phone number) on Checkout page for Delivery details (This appears when delivery and billing addresses are different).

Can you help me to resolve this issue?

Thanks in advance.
The system default fields are address 1 and address 2. Use the Address 2 field to modify the title as a delivery call.

This is the easiest way to handle it.

Newbie

Posts

Joined
Sat Feb 12, 2022 12:23 pm
Who is online

Users browsing this forum: timstudio and 192 guests