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] %}

Newbie

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


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?

Newbie

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


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 14 guests