Jump to content

jval

Members
  • Posts

    57
  • Joined

  • Last visited

Community Answers

  1. jval's post in [SOLVED] Create product via php was marked as the answer   
    OK, founded solution:
    This code:
    <?php $site_base_path = "../"; include($site_base_path . 'config/config.inc.php'); require_once($site_base_path . 'init.php'); $product = new Product(); $product->ean13 = 9999999999999; $product->name = array((int)Configuration::get('PS_LANG_DEFAULT') => 'Test importu');; $product->link_rewrite = array((int)Configuration::get('PS_LANG_DEFAULT') => 'test-importu'); $product->id_category = 6; $product->id_category_default = 6; $product->redirect_type = '404'; $product->add(); $product->addToCategories(array(6)); ?> working for me.
    Thank you
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More