Post by elpidios » Fri Sep 14, 2018 5:19 pm

OC Version: 3.0.2.0
Theme: default

Hi
I am trying to do something like the below in the admin dashboard but unfortunately is not working. I want to print the custom field number --> Customers --> Customers.
Until now I done
This one is working fine {% if email %}{{ email }}{% endif %} for email
This not working {% if custom_field[13] %}{{ custom_field[13] }}{% custom_field[13] %}

New member

Posts

Joined
Wed Feb 28, 2018 2:26 am

Post by straightlight » Fri Sep 14, 2018 7:51 pm

elpidios wrote:
Fri Sep 14, 2018 5:19 pm
This one is working fine {% if email %}{{ email }}{% endif %} for email
Unrelated to the topic.
elpidios wrote:
Fri Sep 14, 2018 5:19 pm
This not working {% if custom_field[13] %}{{ custom_field[13] }}{% custom_field[13] %}
Related to topic. However, custom fields are defined by array key names and not by numbers. It would also be needed to switch your [] to . (dots) to call your indexes in TWIG files.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by elpidios » Fri Sep 14, 2018 8:58 pm

so can you give me an example please?

New member

Posts

Joined
Wed Feb 28, 2018 2:26 am

Post by straightlight » Fri Sep 14, 2018 9:10 pm

Use TextCrawler or see the codes on GitHub. Lots of examples are already provided.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 412 guests