Jump to content

mardon

Members
  • Posts

    189
  • Joined

  • Last visited

Everything posted by mardon

  1. Ono se to ještě komplikuje tím, že zboží má atributy barvu a velikost, tedy chci je nechat vybrat 3 položky zboží s různými atributy a potřebuji, aby se jedna cena odečetla jako sleva
  2. V prestashopu generujeme faktury. Nyní chcme vytvořit akční zboží 2+1 zdarma. Účetní poradil, že nejjednodušeji je vygeberovat fakturu, kde bude na konci uvedena sleva a tou se odečte jedna cena výrobku. Neřešil někdo něco podobného? Dá se to nějak nastavit?
  3. Na localhostu zkouším upgrade z presty 1.4.0.13 na nejnovější verzi 1.6.0.14. Upgrade proběhl v pořádku, ale mám problém se zobrazením v defaultní šabloně. Např. nezobrazují se mi doporučené produkty na homepage, přesto že model ja aktivován. Domnívám se že problém bude někde v zavěšení modulu. Takto se mi nezobazuje např. ani menu. Lze nějak najednou zavěsit všechny použité moduly v šabloně, nebo musím jednotlivé moduly procházet a nastavovat?
  4. I want use own php script fo adding product to shop, i use $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 = 2; $product->id_category_default = 2; $product->redirect_type = '404'; $product->price = 22; $product->quantity = 1; $product->minimal_quantity = 1; $product->show_price = 1; $product->on_sale = 0; $product->online_only = 1; $product->meta_keywords = 'test'; $product->is_virtual=1; $product->add(); $product->addToCategories(array(2)); $id_product = $product->id; $url = 'http://demo-simpliashop-cz.ecdn.cz/img/mini/4.jpg'; $shops = Shop::getShops(true, null, true); $image = new Image(); $image->id_product = $id_product; $image->position = Image::getHighestPosition($id_product) + 1; $image->cover = true; // or false; if (($image->validateFields(false, true)) === true && ($image->validateFieldsLang(false, true)) === true && $image->add()) { $image->associateTo($shops); if (!AdminImportController::copyImg($id_product, $image->id, $url, 'products', false)) { $image->delete(); } but this produce error: Call to protected method AdminImportControllerCore::copyImg() from context How can i use AdminController in my script
  5. Hi and its possible create this way a product with specific product_id? When i run this script I obtain error : Call to protected method AdminImportControllerCore::copyImg() from context
  6. Hi, I wrote my own script for import products from xml. I have a fucntion for addimage from xml function addImage($id_product,$file,$cover,$position) { $flag = Db::getInstance()->insert('image',array( 'id_product' => $id_product, 'position'=> $position, 'cover' => $cover )); $id_image = Db::getInstance()->Insert_ID(); $flag = Db::getInstance()->insert('image_lang', array( 'id_image' => $id_image, 'id_lang' => 1, 'legend' => 'test' )); $flag = Db::getInstance()->insert('image_shop', array( 'id_image' => $id_image, 'id_shop' => 1, 'cover' => $cover )); $imagesTypes = ImageType::getImagesTypes('products'); $id_image = Db::getInstance()->Insert_ID(); $path_d = _PS_IMG_DIR_.'p/'.$id_image; $path = _PS_IMG_DIR_.'p/'.$id_image.'/'.$id_image.'.jpg'; mkdir($path_d); $data = file_get_contents($file); $fp = fopen($path, 'w'); fwrite($fp, $data); fclose($fp); $sourceFile['tmp_name']= $path; foreach ($imagesTypes AS $k => $imageType) { if (!ImageManager::resize ( $sourceFile['tmp_name'], _PS_IMG_DIR_.'p/'.$id_image.'/'.$id_image.'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height'] ) ) echo "Chyba IMG ".$file."<br />"; } } after that import i have apropriate values in database tables, but in FO and although BO I cannot seen images, although in BO I see number of images for product, but images are not display. Where is problem in my function?
  7. It seems I find the problem before I have this SQL $sql = 'SELECT c.id_category FROM '._DB_PREFIX_.'category_lang cl, '._DB_PREFIX_.'category c WHERE c.id_category = cl.id_category AND cl.name="'.$name.'" AND c.level_depth='.($level_depth).' AND cl.id_lang = '.$lang.';'; $res = mysql_query($sql); if (mysql_num_rows($res)>0) { echo 'Kategorie '.$name.' jiz existuje'."<br />"; return true; } else { echo 'Kategorie '.$name.' neni v systemu'."<br />"; return false; } when I changeid to $sql = 'SELECT c.id_category FROM '._DB_PREFIX_.'category_lang cl, '._DB_PREFIX_.'category c WHERE c.id_category = cl.id_category AND cl.name="'.$name.'" AND c.level_depth='.($level_depth).' AND cl.id_lang = '.$lang.';' Db::getInstance()->ExecuteS($sql); $num_rows = Db::getInstance()->NumRows(); if ($num_rows>0) { echo 'Kategorie '.$name.' jiz existuje'."<br />"; return true; } else { echo 'Kategorie '.$name.' neni v systemu'."<br />"; return false; } now is everything ok
  8. maybe is thata problem? Fatal error: Uncaught Cannot execute queries while other unbuffered queries are activUne. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.<br /><br /><pre>UPDATE ps_category c, ps_category_lang cl SET date_upd = now() WHERE c.id_category = cl.id_category AND cl.name = "Elektronická cigareta" AND cl.id_lang = 1 AND c.level_depth = 2;</pre> thrown in D:\web\ps16\classes\db\Db.php on line 635
  9. for example: UPDATE ps_category c, ps_category_lang cl SET date_upd = now() WHERE c.id_category = cl.id_category AND cl.name = "Elektronická cigareta" AND cl.id_lang = 1 AND c.level_depth = 2;
  10. Hi all, I am trying to write owm php script from importing data from xml file. I have function function updateCategory ($name, $level_depth, $lang) { echo 'UPDATE Kategorie '.$name."<br />"; $sql = 'UPDATE '._DB_PREFIX_.'category c, '._DB_PREFIX_.'category_lang cl SET date_upd = now() WHERE c.id_category = cl.id_category AND cl.name = "'.$name.'" AND cl.id_lang = '.$lang.' AND c.level_depth = '.$level_depth.';'; $flag = Db::getInstance()->execute($sql); if ( !$flag ) echo "Chyba pri Update category: ".$name."<br />"; } execute sql produce error, when I am using the sql command from phpmyadmin is ok, but in script produce error even when i see in database the date_upd is changed to now
  11. Yes, both cahe option are disabled. Still installation module is running about 2 mins. Maybe this setting in PHP. On localhost i use XAMPP
  12. Hi, on localhost i have copy my real e-shop 1.4.3 prestahop version. I try upgrade to 1.6.0.9 with 1-clic upgrade module and evertyhing semms to be ok. But now whem I trying install any module and clic to proceed to intall (in warnin that i have no original module) nothing else hapen. where may i have problem install 3-part module? Edit: module installation is succesfull but long time about (2 min.)
  13. Hi i try install last version 1.5.3 but when i click proceed to instal nothing hapen. I use last version prestashop 1.6.0.9 which is upgrade for my shop from 1.4.3
  14. Tak jsem si to nechal zobrazit v IE8 a IE9 a jedná se o problém s megamenu, které se v těchto prohlížečích nezobrazuje správně. Jedná se o tuto šablonu. Tak teď opravdu váhám jestli do toho jít.
  15. Uvažuji o upgradu svého e-shopu na nejnovější verzi, s tím , že bychom nasadili responzivní design. Vybrala jsem si hezké téma z themeforest, ale mám problém s tím, že podporuje IE9 a výše. Co jsem koukala do GA, máme ještě nějaké zákazníky, kteří používají IE8. Řešili jste někdo podobný problém? Používáte responzivní design a projevilo se to nějak na úspěšnosti? Díky předem za vaše postřehy
  16. Tak prozatím jsem si pomohla sama. Pokud by zde byl, ale nějaký odborník na ajaxový košík. Uvítala bych možná nějaké rady a konzultace.
  17. Na mém webu www.tucnak.cz/shop pokud přidám produkt do košíku rozbalí se mi košík, ale už se opět nesablí. Prosím nebo hledám někoho , kdo to umí s js, zda by mi neporadil nebo neprovedk opravu chyby.
  18. Hi I trry install last 1.6.0.9 prestashop on two computers one windows one linux and always a obtain error in instalation modules supplements
  19. in xml i found fail <request result="fail" sqlfile="1.6.0.7"> <sqlQuery> <![CDATA[ ALTER TABLE `ps_order_detail_tax` DROP PRIMARY KEY ]]> </sqlQuery> <sqlMsgError> <![CDATA[ Can't DROP 'PRIMARY'; check that column/key exists ]]> </sqlMsgError> <sqlNumberError> <![CDATA[ 1091 ]]> </sqlNumberError> </request>
  20. Hi all, in my test server i upgrade from prestashop 1.4.3 to actual 1.6.0.8. The upgrade produce xml with error 34 internal SQL error. But shop seems to be function and ok. What the problem? xml I attached
  21. Takže si sama odpovím, po upgradu je potřeba zkontrolovat zda jsou nainstalované a updatované všechny moduly
  22. Na localhostu jsem zkusila upgrade prestashopu 1.4.3 na 1.6.0.8 pomocí 1-clcik upgrade, ale mám problém, že nastavení default šablony neodpovídá nastavení na demo prestashop 1.6.0.8. Jak resetovat nastvení pro default šablonu?
  23. Hi all, I upgrade my e-shop in Czech languge from 1.4.3 to 1.6.0.8 by 1-click upgade. But i have admin menu in english even if i import czech localization. If i install clean 1.6.0.8 i see admin menu in Czech language. Where is problem in my upgradeed e-shop? I see in db the table ps_tab_lang isnit translate to czech language. I detect in my shop in ps_lang table i have 21 records and czech is with id 10 and is active. In clean install of 1.6 i saw in ps_lang only Czech language and have id 1. It seems to be problem my shop is started at version 1.0.0.8 and i even upgrade to new version. How is best solution for repair the problem? I solve this problem
×
×
  • Create New...

Important Information

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