Post by xxvirusxx » Sat Apr 21, 2018 10:00 pm

I have an extension for oc 3.0.2.0 and I want to convert for oc 2.3.0.2.

I know that this example:

Code: Select all

{{ some_text }}
will became

Code: Select all

<?php echo $some_text; ?>
This

Code: Select all

{% for manufacturer in manufacturers %}
in

Code: Select all

<? php foreach  ($manufactures as $manufacturer)  { ?>
But I don`t understand how this type of twig code can be in tpl code

Code: Select all

 {% if error.manufacturer.manufacturer_number.manufacturer_id %} error-field{% endif %}
in..?

LE. Something like this?

Code: Select all

<?php if (isset($error[$manufacturer['manufacturer_number']['manufacturer_id']])) { ?> error-field <?php } ?>
Can anyone give an example?
Tks

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by bhavhirani » Thu Feb 04, 2021 1:15 pm

You can convert your Twig code to PHP or TPL here : https://www.easycodetools.com/tool/twig ... -converter here, is online twig to PHP converter ( online twig to TPL converter )
Last edited by bhavhirani on Mon Apr 10, 2023 3:24 pm, edited 3 times in total.

User avatar
Newbie

Posts

Joined
Sun Dec 04, 2016 12:54 pm
Location - india

Post by xxvirusxx » Thu Feb 04, 2021 3:33 pm

Useless.

Do you think I didn't found the answer in 3 years? :laugh: :laugh:
And stop spamming.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 233 guests