- Posts: 95
- Thank you received: 1
Display limited to functionality
- wideservices
-
Topic Author
- Offline
Less
More
12 years 6 months ago #156530
by wideservices
Display limited to functionality was created by wideservices
Hi,
I would like to create a custom field (radio button- invoice or receipt) at the address table and when invoice is checked i would like some extra fields to appear in the form. I guess display limited to is the answer but i cannot get it to work. eg:
i check Firstname at display limited to but then i dont get a section on where to put the exact values of the firstname. what am i doing wrong? thank you.
I would like to create a custom field (radio button- invoice or receipt) at the address table and when invoice is checked i would like some extra fields to appear in the form. I guess display limited to is the answer but i cannot get it to work. eg:
i check Firstname at display limited to but then i dont get a section on where to put the exact values of the firstname. what am i doing wrong? thank you.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 6 months ago #156547
by Mohamed Thelji
Replied by Mohamed Thelji on topic Display limited to functionality
Hello,
If you want to add a field to the address section of your invoice, the solution will be to edit the "address_template" file of the "order" view, of your back-end template through "Hikashop->Display->Views" and directly add what you want.
If you want to add a field to the address section of your invoice, the solution will be to edit the "address_template" file of the "order" view, of your back-end template through "Hikashop->Display->Views" and directly add what you want.
Please Log in or Create an account to join the conversation.
- wideservices
-
Topic Author
- Offline
Less
More
- Posts: 95
- Thank you received: 1
12 years 6 months ago #156694
by wideservices
Replied by wideservices on topic Display limited to functionality
Hi ,
thanks for the answer. But what if i want a condition in order to show a field or not at the invoice?
For example how can i show a field in the invoice if it has a specific value else not show it?
thanks for the answer. But what if i want a condition in order to show a field or not at the invoice?
For example how can i show a field in the invoice if it has a specific value else not show it?
Please Log in or Create an account to join the conversation.
12 years 6 months ago #156711
by Xavier
Replied by Xavier on topic Display limited to functionality
Hi,
I think that what you need will require some custom code.
You have to add a custom PHP check in the view "address / show" in:
To display or not the custom field depending on another value.
I think that what you need will require some custom code.
You have to add a custom PHP check in the view "address / show" in:
Code:
foreach($this->fields as $field){
$fieldname = $field->field_namekey;
$html = str_replace('{'.$fieldname.'}', $this->fieldsClass->show($field, @$this->address->$fieldname), $html);
}
Please Log in or Create an account to join the conversation.
- wideservices
-
Topic Author
- Offline
Less
More
- Posts: 95
- Thank you received: 1
12 years 6 months ago #156973
by wideservices
Replied by wideservices on topic Display limited to functionality
thank you for your reply it really helped!
i have customized address/show and order/show to my needs and they work fine. But wehn the email is sent after an order it uses the default template and it doesn;t take my customization into account. What file shall i hack in order to change the email after order and the order confirmed email? Thank you
i have customized address/show and order/show to my needs and they work fine. But wehn the email is sent after an order it uses the default template and it doesn;t take my customization into account. What file shall i hack in order to change the email after order and the order confirmed email? Thank you
Please Log in or Create an account to join the conversation.
12 years 6 months ago #156974
by Xavier
Replied by Xavier on topic Display limited to functionality
Hi,
You have to edit the email directly via the menu System > Emails. and add the if condition in the preload part.
You have to edit the email directly via the menu System > Emails. and add the if condition in the preload part.
Please Log in or Create an account to join the conversation.
- wideservices
-
Topic Author
- Offline
Less
More
- Posts: 95
- Thank you received: 1
12 years 6 months ago #157063
by wideservices
Replied by wideservices on topic Display limited to functionality
Thank you for yor reply i started looking into the email templates and i might have found a typo.
order notification email ->preload version ->line 240
$additionaltionnal i think should be $additional but i may be wrong.
anyway i just post it and you can see this.
order notification email ->preload version ->line 240
$additionaltionnal i think should be $additional but i may be wrong.
anyway i just post it and you can see this.
The following user(s) said Thank You: Mohamed Thelji
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds