I need to transfer the id of each product to the array with products. I’ve been in the order.php model to add a value to the array. but nothing comes out. In the basket in the products array there is the value ['key'] who can tell how it is formed? opencart 2.0.1.1

please point in the right direction

after a small check that this model does not pass the key parameter to the basket, I need another model. just not clear what. There is no additional model for the basket in the modules folder.

  • When added to the basket via Ajax, a page with php code is requested, passing product data there (product_id ...). Php code enters the data in the databasename.orders table. And when we go to the orders page, all the records from this table are selected - Vanya Avchyan
  • tell me how to add the transfer id of goods in the basket? - mydls1
  • And it is not added when you click on add to cart button? - Vanya Avchyan
  • I am setting up dynamic re-marketing and I need to pass on the goods. and when I display the products variable in the basket, there is no id, there is only a key from the identification values ​​/ here is the array (10) {["key"] => string (39) "YToxOntzOjEwOiJwcm9kdWN0X2lkIjtpOjY0O30" - mydls1

1 answer 1

The answer is found. very strange but the array I need is in the controller ControllerCommonCart $ data ['products'] [] add the line 'id' => $ product ['product_id'],