How to edit / add attributes or any other data with this add-on?

Hi,

I see there is lot of options with this module, but is possible to edit / add attributes with this add-on? How can I add fields via multi_update.inc.php to add-on?

Thanks!

tim

Sorry multi update is a two dimensional view, while attributes requires more than two dimensions for editing.

Is this a one time need, or will you be needing to do this continously?

It's possible to write a script that does this.

foreach ([1, 2, 3] as $product_id) {

  $product = new ent_product($product_id);

  $product->data['options'][] = [
    'group_id' => 11,
    'function' => 'select',
    'required' => 1,
    'sort' => 'alphabetically'
    'values' => [
      [
        'value_id' => 22,
        'custom_value' => null,
        'price_operator' => '+',
        'USD' => 5.00
      ],
      [
        'value_id' => 0,
        'custom_value' => 'Lorem ipsum',
        'price_operator' => '+',
        'USD' => 0
      ],
    ],
    'priority' => 99,
  ];

  $product->save();
}

Thanks for reply!

This I need continously, because now I need to do this one by one and I remembered I bought this add-on, but there is no attributes (and some other options), so I thought this could be very good to add...

Where should I put this script?

tim

To create your own standalone script. Just include the app.header.inc.php in the top.

myscript.php accessible by site.com/myscript.php:

<?php

  include 'includes/app_header.in.php';

  // ...

I will try to rush support for product attributes in CSV, but there is always a lot on the wishlist.

Thanks for reply!

Thanks, but I mean to add attributes in this add-on, not csv.

tim

Ok, that's a no go unfortunately. I don't know how I would solve that. Ideas are welcome.

Ok, thanks anyway :)

Veja o código no GitHub