Jump to content

Problem with the combination generator


Recommended Posts

When I try to use the combination generator with any product, after I select any combination (1 or more, it doesn't matter) and click "Add" nothing happend. No message error, no creation of the combinations...

If I use the navigator console I got the message: "ReferenceError: add_attr_multiple is not defined".

I'm using Prestashop 1.6.1.11

Anybody knows how to solve this?

Edited by jaimeZesis (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

You can try with:

  • Add js and/or css files in /prestashop/themes/theme-name/js (or css).
  • Edit /prestashop/classes/controller/FrontController.php.
  • Add below code:

<?php

  • class FrontController extends FrontControllerCore
    {
        public function setMedia()
        {
            parent::setMedia(); // CSS files
            Tools::addJS(_THEME_JS_DIR_.'myfile.js');
            Tools::addCSS(_THEME_CSS_DIR_.'myfile.css', 'all');
        }
    }
Link to comment
Share on other sites

Dhvani my problem is with the back office, but putting what you say on other route (/prestashop/adminFolder/themes/default/js/ )and editing /classes/controller/adminControler.php makes the "Add" button work, but now, when I click on "Generate this combinations" I get "Property Combination->minimal_quantity is empty" error.

 

What I think is failing is that when I go to the combinations generator the attributes.js file (which is the one who makes all work) is not loaded.

 

EDIT: I add this line:

$this->addJS(__PS_BASE_URI__.'js/admin/attributes.js');

 

on the /classes/controller/adminControler.php file, and now the attributes.js file is loaded on the page, but I keep having the "Property Combination->minimal_quantity is empty" error.

Edited by jaimeZesis (see edit history)
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...