Post by jonkers20 » Sat Jan 26, 2019 3:56 am

hello I am working on a module of 2.x which to 3.x.
But I can not get this php to twig properly

Code: Select all

<php array_unshift($stock_statuses, array('stock_status_id' => 0, 'name' => '' )); foreach ($stock_statuses as $stock_status) { ?>



Sat Jan 26, 2019 3:51 am

Post by straightlight » Sat Jan 26, 2019 11:31 pm

Partial code posted; complete solution needed. Forum rules.

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

F. Rules:

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


Legendary Member


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

Post by JNeuhoff » Sat Jan 26, 2019 11:40 pm

Perhaps the Twig merge filter can accomplish the same thing.

Or you can keep it as a PHP template and use our Template Switcher PHP/Twig to also support PHP templates in OpenCart 3.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig

User avatar
Expert Member


Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 13 guests