Jump to content

galactic

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by galactic

  1. Можете выложить здесь решение с того сайта? (сайт тормозит и постоянно падает)
  2. указаний на версию не нашел, но кажется для 1.5, по крайней мере сайт на PS1.5
  3. Если кому нужно, вот модуль импорта товаров в магазин из XML, Ultimate XML Importer Free Edition. Вероятно, там есть какие-то ограничения, т.к. существует платная версия $97.00 Сам не проверял, импортировать пока нечего. )) Кто проверит, напишите как он работает. ultimateXML_v1.2_free.zip
  4. Cпасибо!)) Работает нормально. Одно маленькое замечание: у меня перед каждым продуктом он дублирует картинку, как заголовок: </item> http://site.com/15-large_default/ipod-nano.jpg <item> ... ...
  5. Cамый первый и последний продукты дублируются? А также, откуда берётся количество, например iPod touch <in_stock>5</in_stock>? (на странице не выведено).Tы немного изменил скрипт под свой шаблон?
  6. well, but the rest code need be in the body section.
  7. I'm telling not about hook, I mean to implement header.tpl template for this module, to use it when javascript need be placed in header section.
  8. is there way to implement a separate header.tpl template, that will store code like this: <!-- Block HTML box HEADER --> <link rel="stylesheet" type="text/css" href="{$absoluteUrl}css/style.css" /> <script src="{$absoluteUrl}js/myjavascript.js" type="text/javascript"></script> <!-- Block HTML box HEADER -->
  9. Mодель - это артикул товара (Reference), так точнее. <model>6120</model> В первом варианте <reference>$product['id_product']</reference> наверно напутано. Но твой линк недоступен: Not Found ( The requested URL /1541/demo.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
  10. Problem: one javascript code must be placed inside of the <head> tags, and another part of javascript MUST be placed just before the </body> tag: how to get this?
  11. пробовал твои предложения (кроме цены): <root> <?php $default_currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); foreach ($tab_cat_final as $id_category=>$name_category) { $products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10000 ? 10000 : $number), $orderBy, $orderWay, $id_category, true); foreach ($products AS $product) { $price = Product::getPriceStatic($product['id_product']); if ($product['reduction_percent'] > 0) $prix_promo = $price * (1 - $product['reduction_percent'] / 100); else $prix_promo = ($price-$product['reduction_price']); Context::getContext()->link->getImageLink($product['link_rewrite'], Image::getCover($product['id_product']), 'large_default'); StockAvailable::getQuantityAvailableByProduct($product['id_product'], $product['id_product_attribute']) $cat = new Category($product['id_category_default']); $link = $cat->getLink(); echo "<item>\n"; echo "<name><![CDATA[".$product['name']."]]></name>\n"; echo "<link><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></link>\n"; echo "<price>".Tools::displayPrice($price, $default_currency)."</price>\n"; echo "<image>".$image_link."</image>\n"; echo "<category_full><![CDATA[".$name_category."]]></category_full>\n"; echo "<category_link><![CDATA[".$link."]]></category_link>\n"; echo "<manufacturer><![CDATA[".$product['manufacturer_name']."]]></manufacturer>\n"; echo "<reference><![CDATA[".$product['reference']."]]></reference>\n"; echo "<in_stock><![CDATA[".$product['id_product_attribute']."]]></in_stock>\n"; echo "</item>\n"; } } ?> </root> скрипт выдаёт ошибку: Parse error: syntax error, unexpected T_VARIABLE in /home/dsabcs/public_html/test.php on line 61
  12. The HTMLbox can be attached to one position at a time which was selected in module configuration?
  13. Does this HTMLbox can be attached to one position at a time, which was selected in module configuration, and then module can not be moved on different positions via translpant module? Does it save all input html, js,css fully untouched, without stripping tags, so code remains completely unchanged? Where it store content?
  14. if you mean http://www.prestashop.com/forums/topic/37900-module-product-export-module-v10-updated-for-14-free/ its for CSV export, not XML, and it for PS 1.4
  15. I tried this HTML box, I placed popup code for top hook(for example): but this module show this popup every time I click on whatever menu link, it show popup message every time on any page. This action makes no sence at all. The idea is to display popup message only on one specific page or when user do a specific action: for example,when he place order by clicking "Check out" button - on http://mystore.com/en/order page. Is is possible to adjust script for this purpose?
  16. ты не понял: я не прошу твою реализацию данного (несложного) скрипта на Simple XML, а прошу показать конкретно твои изменения в существующем коде. Хотя бы для того, чтобы увидеть, работают твои предложения или нет. A oбщие замечания смысла не имеют вообще.
  17. A можешь показать, как должен выглядеть полный код с учётом указанных изменений?
  18. PS v1.5.4.1 Нужно реализовать экспорт продуктов в XML для сайтa сравнения. XML должен иметь такой формат: <? Xml version = "1.0" encoding = "utf-8"?> <root> <item> <name> Shure SE210 </ name> <link> http://www.myshop.com/ru/accessories-ipod/se210-blanc.html</link> <price> 150.55 </ price> <image> http://www.myshop.com/14-large_default/shure-se210.jpg </image> <category_full> Accessories </category_full> <category_link> http://www.myshop.com/ru/4-accessories-ipod</category_link> <manufacturer> Shure Incorporated</manufacturer> <model> SE210</model> <in_stock> 7 </in_stock> </ Item> <item> ... </ Item> </ Root> Есть следующий скрипт, корректно генерирующий часть тэгов, но не все: <?php include(dirname(__FILE__).'/config/config.inc.php'); require_once(dirname(__FILE__).'/init.php'); // Get data $number = (intval(Tools::getValue('n')) ? intval(Tools::getValue('n')) : 10000); $orderByValues = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'ASC', 1 => 'DESC'); $orderBy = Tools::strtolower(Tools::getValue('orderby', $orderByValues[intval(Configuration::get('PS_PRODUCTS_ORDER_BY'))])); $orderWay = Tools::strtoupper(Tools::getValue('orderway', $orderWayValues[intval(Configuration::get('PS_PRODUCTS_ORDER_WAY'))])); if (!in_array($orderBy, $orderByValues)) $orderBy = $orderByValues[0]; if (!in_array($orderWay, $orderWayValues)) $orderWay = $orderWayValues[0]; //$id_category = (intval(Tools::getValue('id_category')) ? intval(Tools::getValue('id_category')) : 1); $currency = new Currency(intval($cookie->id_currency)); $affiliate = (Tools::getValue('ac') ? '?ac='.Tools::getValue('ac') : ''); $categTree = Category::getRootCategory()->recurseLiteCategTree(0); function constructTreeNode($node){ $ret = ';'; $ret .= $node['id'].'|'.$node['name'].';'; if(!empty($node['children'])) { $ret .= ';'; foreach ($node['children'] AS $child) $ret .= constructTreeNode($child); $ret .= ';'; } return $ret; } foreach ($categTree['children'] AS $child) $ulTree .= constructTreeNode($child); $tab_cat=explode(';',$ulTree); foreach ($tab_cat as $id2cat){ $tab_id2cat=explode('|',$id2cat); if (!empty($tab_id2cat)) $tab_cat_final[$tab_id2cat[0]]=$tab_id2cat[1]; } header("Content-Type:text/xml; charset=utf-8"); echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; ?> <root> <?php foreach ($tab_cat_final as $id_category=>$name_category){ $products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10000 ? 10000 : $number), $orderBy, $orderWay, $id_category, true); foreach ($products AS $product) { $image = Image::getImages(intval($cookie->id_lang), $product['id_product']); $prix=Product::getPriceStatic($product['id_product']); if ($product['reduction_percent']>0) $prix_promo=$prix*(1-$product['reduction_percent']/100);else $prix_promo=($prix-$product['reduction_price']); echo "<item>\n"; echo "<name><![CDATA[".$product['name']."]]></name>\n"; echo "<link><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></link>\n"; echo "<price>".$prix."</price>\n"; echo "<image>"._PS_BASE_URL_.__PS_BASE_URI__."img/p/".$image[0]['id_product']."-".$image[0]['id_image']."-large.jpg</image>\n"; echo "<category_full><![CDATA[".$name_category."]]></category_full>\n"; echo "<category_link><![CDATA[".htmlspecialchars($link->getcategoryLink($category['id_category'], $category['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></category_link>\n"; echo "<manufacturer><![CDATA[".$product['manufacturer_name']."]]></manufacturer>\n"; echo "<reference><![CDATA[".$product['id_product']."]]></reference>\n"; echo "</item>\n"; } } ?> </root> есть следующие проблемы: 1. неправильный формат цены: показывает 191.26073 вместо 191.26, или 65 вместо 65.00. 2. неправильный путь к картинке: http://mysite.com/img/p/8-27-large.jpg, должен быть: http://mysite.com/14...ult/picture.jpg 3. неправильный category_link: 'http://mysite.com/ru/-', вместо http://www.mysite.com/7-cellphones/ 4. как получить модель <model> SE210 </model> и 5. количество в магазине <in_stock> 5 </in_stock> ?
  19. I want export a product list to XML for price comparison engine. I have some PHP script that works partially (not all items works). <?php include(dirname(__FILE__).'/config/config.inc.php'); require_once(dirname(__FILE__).'/init.php'); // Get data $number = (intval(Tools::getValue('n')) ? intval(Tools::getValue('n')) : 10000); $orderByValues = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'ASC', 1 => 'DESC'); $orderBy = Tools::strtolower(Tools::getValue('orderby', $orderByValues[intval(Configuration::get('PS_PRODUCTS_ORDER_BY'))])); $orderWay = Tools::strtoupper(Tools::getValue('orderway', $orderWayValues[intval(Configuration::get('PS_PRODUCTS_ORDER_WAY'))])); if (!in_array($orderBy, $orderByValues)) $orderBy = $orderByValues[0]; if (!in_array($orderWay, $orderWayValues)) $orderWay = $orderWayValues[0]; //$id_category = (intval(Tools::getValue('id_category')) ? intval(Tools::getValue('id_category')) : 1); $currency = new Currency(intval($cookie->id_currency)); $affiliate = (Tools::getValue('ac') ? '?ac='.Tools::getValue('ac') : ''); $categTree = Category::getRootCategory()->recurseLiteCategTree(0); function constructTreeNode($node){ $ret = ';'; $ret .= $node['id'].'|'.$node['name'].';'; if(!empty($node['children'])) { $ret .= ';'; foreach ($node['children'] AS $child) $ret .= constructTreeNode($child); $ret .= ';'; } return $ret; } foreach ($categTree['children'] AS $child) $ulTree .= constructTreeNode($child); $tab_cat=explode(';',$ulTree); foreach ($tab_cat as $id2cat){ $tab_id2cat=explode('|',$id2cat); if (!empty($tab_id2cat)) $tab_cat_final[$tab_id2cat[0]]=$tab_id2cat[1]; } header("Content-Type:text/xml; charset=utf-8"); echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; ?> <root> <?php foreach ($tab_cat_final as $id_category=>$name_category){ $products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10000 ? 10000 : $number), $orderBy, $orderWay, $id_category, true); foreach ($products AS $product) { $image = Image::getImages(intval($cookie->id_lang), $product['id_product']); $prix=Product::getPriceStatic($product['id_product']); if ($product['reduction_percent']>0) $prix_promo=$prix*(1-$product['reduction_percent']/100);else $prix_promo=($prix-$product['reduction_price']); echo "<item>\n"; echo "<name><![CDATA[".$product['name']."]]></name>\n"; echo "<link><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></link>\n"; echo "<price>".$prix."</price>\n"; echo "<image>"._PS_BASE_URL_.__PS_BASE_URI__."img/p/".$image[0]['id_product']."-".$image[0]['id_image']."-large.jpg</image>\n"; echo "<category_full><![CDATA[".$name_category."]]></category_full>\n"; echo "<category_link><![CDATA[".htmlspecialchars($link->getcategoryLink($category['id_category'], $category['link_rewrite'], Tools::getValue('id_category'))).$affiliate."]]></category_link>\n"; echo "<manufacturer><![CDATA[".$product['manufacturer_name']."]]></manufacturer>\n"; echo "<reference><![CDATA[".$product['id_product']."]]></reference>\n"; echo "</item>\n"; } } ?> </root> I need get 9 items, format is like this: <? Xml version = "1.0" encoding = "utf-8"?> <root> <item> <name> Nokia 6120 </ name> <link> http://www.myshop.com/info/Nokia6120/</link> <price> 150.55 </ price> <image> http://www.myshop.com/images/Nokia6120.jpg </image> <category_full> Cell Phones & gt; & gt; Nokia </category_full> <category_link> http://www.myshop.com/nokia</category_link> <manufacturer> Nokia </manufacturer> <model> 6120 </model> <in_stock> 7 </in_stock> </ Item> <item> ... </ Item> </ Root> I need help to fix problem for the following items: 1. wrong price format: script show 191.26073 instead of 191.26 and 65 instead of 65.00. 2. show incorrect image path: http://mysite.com/img/p/8-27-large.jpg, the correct patch need to be: http://mysite.com/27...ult/picture.jpg 3. incorrect category_link: 'http://mysite.com/en/-', need to be http://www.mysite.com/7-cellphones/ 4. I need get <model> 6120 </model> and 5. <in_stock> 5 </in_stock> quantity Any help would be appreciated.
  20. How to set Currency restriction for Paypal module in Prestashop 1.5.4.1 to ONE currency only (Eur), without enabling Customer currency and Shop default currency, the one of which must me selected in radiobox? Problem is that Paypal module did not convert from shop default currency (which not supported by Paypal) to Eur, the default currency of my Paypal acc. My shop default currency not supported by Paypal, and although I have two currencies enabled in Localization > Currencies, when user do checkout in non-supported currency, it get error L_LONGMESSAGE0 -> Currency is not supported. So user always need switch currency to Eur on product page before he checkout with Paypal. Paypal module simply not convert to Eur when customer did checkout in non-supported currency.
×
×
  • Create New...

Important Information

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