Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

How to remove Fax field from checkout guest_step_1

Started by Geoffrey, July 03, 2017, 04:22:53 PM

Previous topic - Next topic

Geoffrey

Can you tell me how to remove the Fax field from checkout guest_step_1?

There is no specific call for this field in guest_step_1.tpl.  It is apparently part of a family of general form fields.  If a field is in the family, it will get called. 

I searched in default controller files, but could not find a way there to remove Fax from the family. 

It is not a required field, therefore should be easy to remove. 

Any help?

Thanks.

abolabo

you can add skipping there.
Just add

if($field_name == 'fax'){ continue; }

after
foreach ($form['fields']['general'] as $field_name=>$field) {
before close php tag ?>
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Geoffrey

Thanks for the suggestion. 

I tried it as directed.  It didn't work. 

After doing some reading, I can see the logic of inserting continue "to skip the rest of the current loop iteration and continue execution at the condition evaluation ".

I tried every conceivable location for the snippet, and also tried variations with different use of spaces in the code snippet, and tried removing the {}, etc. 

So I really tried to make your suggestion work, but it never removed the Fax name or field, and it always resulted in displaying the code snippet directly on the site page.  (I cleared cache each iteration. )

I suspect that your suggestion is very close to a solution, but there is a format or syntax problem interfering, and identification of that problem is beyond my capabilities. 

Any ideas?

Thanks!

Geoffrey

#3
...

Geoffrey

Sorry, what I meant to say was "bump".  Anyone?

abolabo

"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Geoffrey

Ah.  That was it.

I misunderstood the original instructions.
 
I thought the close tag was line 37-38, but I see now that 37-38 is its own tag, and the close tag for the skip is actually line 29 ?>. 

So simple.  Now I know. 

Thanks for taking the time so that a noob can understand really simple things like close tag.  Duh. 

You have lightened my burden!  :-)

Forum Rules Code of conduct
AbanteCart.com 2010 -