Jump to content

Kikert

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Location
    Warsaw, Poland
  • Activity
    Freelancer

Kikert's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I have problem with specials block in PS 1.5.6.1. I wanted to change thumbs size to my custom one. So I created new size in backend and generated files (correctly, I checked the address). Then I changed image src to {$link->getImageLink($special.link_rewrite, $special.id_image, 'main_discounts')|escape:'html'} And I still have large_default image in this box. Smarty cache is disabled. Can somebody suggest what's wrong?
  2. Hi', I'm creating custom products importer for Prestashop. The problem is, I have really complicated categories structure (6-level depth) and it takes a lot of time to add them (even 38 seconds for one) to the database. I've decide to create custom function to speed it up: function addCategory($name, $rewrite_name, $parent, $depth) { $d = date("Y-m-d H:i:s"); $db = Db::getInstance(_PS_USE_SQL_SLAVE_); $db->execute('INSERT INTO '._DB_PREFIX_.'category (id_parent, level_depth, active, date_add, date_upd) VALUES ('. $parent .', '. $depth .', 1, "'. $d .'", "'. $d .'")'); $id = $db->Insert_ID(); $db->execute('INSERT INTO '._DB_PREFIX_.'category_group (id_category, id_group) VALUES ('. $id .', 1), ('. $id .', 2), ('. $id .', 3)'); $db->execute('INSERT INTO '._DB_PREFIX_.'category_lang (id_category, id_lang, name, link_rewrite) VALUES ('. $id .', '. (int)Configuration::get('PS_LANG_DEFAULT') .',"'. $name .'", "'. $rewrite_name .'")'); return $id; } The problem is, after successfull executing these queries data is inserted to the tables, but not visible in front nor in backend office. Am I missing something? Maybe I calculate something wrong?
  3. Hi, I'm creating custom products importer (external PHP script) fetching data from CSV. Quick overview of code: 1. Import prestashop/config/config.inc.php 2. Iterate CSV rows 2.1 Add categories (works fine) 2.2 Add product or update and add category if exists [...] I'm trying to find product by reference. The problem is, code triggers fatal error if something is found. Unfortunately, I can see "Fatal error" only. I created stack trace: 1. Product::searchByName():3376 2. Product::getPriceStatic() In line 2505 there is the code, which kills my script: if (!$id_cart && !isset($context->employee)) die(Tools::displayError()); Can somebody give a hint what could I have done wrong? I'm fairly new to PrestaShop.
  4. I'm in progress of creating a store for selling leather belts. Products can be grouped by tags (like "for women", "3cm wide", "black") rather than categories. I'm wondering what are possibilities to create filtering system which will fetch only these products in all selected tags (I think it can be also categories as one item can be in many of them). Are there any already made extensions or I will have to create everything from scratch?
×
×
  • Create New...