Jump to content

Add class with product ID to Backoffice product listing


Levi

Recommended Posts

I want to modify the BO product listing with js, but in default, the product rows were identified with ID, and I want to change the id to a class.

For example, i've added a new column to product listing (RSB), and i want to add  the `rsb-product_id` class to this row (where the product is the current product id), or change the `<tr id="tr__8_0" > to <tr class="tr__8_0" >` in the Backoffice product listing.



Image attached.

Prestashop 1.6

I've expanded the controllers/admin/AdminProductControllers.php with this field.

$this->fields_list['rack'] = array(
                'title' => $this->l('R S B'),
                'class' => 'rsb'. $product_id,
                'align' => 'text-center',
            );

How i can define the $product_id ?

Screenshot at 2019-06-22 14-45-54.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...