owebia / magento2-module-advanced-shipping

Other
90 stars 28 forks source link

Additional accepted function #53

Closed tlygnersjo closed 5 years ago

tlygnersjo commented 5 years ago

Could you please add foreach (http://php.net/manual/en/control-structures.foreach.php) as accepted function?

In some cases you'll have to loop through rules (for example multiple rules stored in a multidimensional array).

tlygnersjo commented 5 years ago

I tried to add "foreach" as a allowed function in vendor/owebia/magento2-module-advanced-setting-core/Helper/Evaluator.php on at line 45.

But when i use a "foreach" in shipping rules i get: "$shippingrules // Result NULL

Unsupported Foreach_ expression - Undefined variable"

Is this the wrong way to add support for "foreach" function? I'm sure the array $shippingrules is set.

owebia commented 5 years ago

Hi, foreach is not a function and is already supported. You probably don't use the right syntax. Can you post your configuration ? A.L.

tlygnersjo commented 5 years ago

Hi,

Oh ok! Can i send the configuration on email or Skype?

owebia commented 5 years ago

You can use the contact form here: https://en.store.owebia.com/contact

tlygnersjo commented 5 years ago

I've now sent the configuration to you.