VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: DMA on September 09, 2007, 10:17:28 AM

Title: [FIXED] Vm 1.1 b1 required fields
Post by: DMA on September 09, 2007, 10:17:28 AM
Virtuemart 1.1 b1

Frontend:
Account Maintenance/Shipping Information /Add Address

Field Phone_1 is required no matter what I do.
I tried to remove it from Manage userfields in vm backend but it did not work.

Can anybody tell me in which file I can set/change required fields?

/DMA

Title: Re: Vm 1.1 b1 required fields
Post by: aravot on September 09, 2007, 10:25:55 AM
Using VM 1.1 r928

Admin -> Manage User Fields -> phone_1 unpublish required filed.
Tried during registration works as expected.

However it doesn't work in Frontend -> Account Maintenance / Shipping Information / Add Address

DMA, thanks for reporting
Title: Re: [CONFIRMED] Vm 1.1 b1 required fields
Post by: DMA on September 09, 2007, 11:12:06 AM
No problem  :)
Can anybody tell me which file to edit to get phone_1 optional?

/DMA
Title: Re: [CONFIRMED] Vm 1.1 b1 required fields
Post by: aravot on September 09, 2007, 11:42:22 AM
Q&T note; tracker URL -> http://dev.virtuemart.net/cb/proj/tracker/itemDetails.do?task_id=1425
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: macallf on September 09, 2007, 18:17:42 PM
Shipping fields in the frontend relate to the template

..pages/account.shipto.tpl.php

But this does not relate to manage userfields section.

Would need to edit ps_userfield and account.shipto.php so that the getuserfields list is used to generate the shipto info. Then if a field is set as required or published it would follow the correct behaviour.

Will have to look into further.
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: DMA on September 09, 2007, 21:50:46 PM
I'm sorry but which part of account.shipto.tpl.php do I need to edit to make the fields required or not in the current version?

/DMA
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: macallf on September 09, 2007, 21:56:28 PM
I thought my previous reply answered that!

account.shipto.tpl.php displays the form for adding new shipto addresses. It does not at present relate to the managed userfields.

Hence the quote of

QuoteWill have to look into further.

As this is still a beta  release I will have to look into this problem and rectify it so that it works correctly.
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: DMA on September 09, 2007, 22:13:30 PM
Maybe I'm saying this correctly since english is not my mother tongue.  :-[
I don't want to offend anybody.

What I was meaning to say: I know now that the account.shipto.tpl.php form is not related to managed userfields.
So my question is, can someone please tell me what makes the field phone_1 in account.shipto.tpl.php form required and where can I change it?

/DMA
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: macallf on September 09, 2007, 22:27:06 PM
What I am saying is that there is a fundamental flaw in the way this achieved and that there is no easy answer as to one file that needs changing.

As I see it there could be 3 or more files that need editing to make this work correctly.

Hence I am not giving you a simple answer as there is not one.

Changes need to be made into way this whole operation works, once this has been done it will be incorporated into the nightly build.

As VM1.1 should not be used as a production site this is something not to worry about. It will be corrected before the final release.

If you are using this for a live site then you will have major problems when upgrading.

1. There will be no upgrade path from previous Beta versions, which could include major DB changes.
2. This could result in the complete reload of all relevant data for your site.

As I have said I am looking into it.
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: DMA on September 10, 2007, 00:15:22 AM
Thanks Macallf, I just thought all required fields in in the account.shipto.tpl.php form

Address Nickname*:
First Name*:
Last Name*:
Address 1*:
City*:
Zip/Postal Code*:
Country*:
Phone*:

were set to required in one place.

/DMA
Title: Re: [TRACKER #1425] Vm 1.1 b1 required fields
Post by: macallf on September 10, 2007, 00:22:20 AM
Quote from: macallf on September 09, 2007, 18:17:42 PM
Shipping fields in the frontend relate to the template

..pages/account.shipto.tpl.php

But this does not relate to manage userfields section.

Would need to edit ps_userfield and account.shipto.php so that the getuserfields list is used to generate the shipto info. Then if a field is set as required or published it would follow the correct behaviour.

Will have to look into further.

That is what I stated here. The required/published fields are not working or designed to work with the additional shipto addresses. Hence some major reworking needs to be done so that it does.
Title: Re: [FIXED] Vm 1.1 b1 required fields
Post by: aravot on February 09, 2008, 03:19:30 AM
Implemented in build 1228
Title: Re: [FIXED] Vm 1.1 b1 required fields
Post by: wakoko on February 14, 2008, 14:38:43 PM
i think this cannot be done to in 1.0.13 ecommerce edition
Title: Re: [FIXED] Vm 1.1 b1 required fields
Post by: wakoko on February 14, 2008, 15:00:04 PM
my bad! it could be done in ps_user_address.php