Jump to content

Edit History

Florian644

Florian644

1 hour ago, 4you.software said:

Yes, it must exist in the database,
yes, you can change the type to HTML.

self::$definition['fields']['my_custom_field'] = array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml');

 

Sorry but I have a new issue.

I'm now in the hookActionValidateOrder with the value I needed in Cart so that's reaally nice !

I need now to pass this value in $params['order']->getOrderDetailList()[0]['svgTemplate']

svgTemplate being an added field with override.

Here's my code and it doesn't work..

public function hookActionValidateOrder($params)
    {
        $params['order']->getOrderDetailList()[0]['svgTemplate'] = $params['cart']->my_custom_field;
        $params['order']->update();
     // or $params['order']->save();

		echo "<pre>";
        print_r($params['cart']->my_custom_field);
        echo "<pre>";
        die();
    }

 

Florian644

Florian644

1 hour ago, 4you.software said:

Yes, it must exist in the database,
yes, you can change the type to HTML.

self::$definition['fields']['my_custom_field'] = array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml');

 

Sorry but I have a new issue.

I'm now in the hookActionValidateOrder with the value I needed in Cart so that's reaally nice !

I need now to pass this value in $params['order']->getOrderDetailList()[0]['svgTemplate']

svgTemplate being an added field with override.

Here's my code and it doesn't work..

public function hookActionValidateOrder($params)
    {

        echo "<pre>";
        print_r($params['cart']->my_custom_field);
        echo "<pre>";
        die();

        $params['order']->getOrderDetailList()[0]['svgTemplate'] = $params['cart']->my_custom_field;
        $params['order']->update();
     // or $params['order']->save();
    }

 

Florian644

Florian644

1 hour ago, 4you.software said:

Yes, it must exist in the database,
yes, you can change the type to HTML.

self::$definition['fields']['my_custom_field'] = array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml');

 

Sorry but I have a new issue.

I'm now in the hookActionValidateOrder with the value I needed in Cart so that's reaally nice !

But f

Florian644

Florian644

1 hour ago, 4you.software said:

Yes, it must exist in the database,
yes, you can change the type to HTML.

self::$definition['fields']['my_custom_field'] = array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml');

 

Sorry but I have a new issue.

I'm now in the hookActionValidateOrder with the value I needed in Cart so that's reaally nice !

×
×
  • Create New...