Jump to content

skulaluks

Members
  • Posts

    15
  • Joined

  • Last visited

skulaluks's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. oh, here in this forum is some hacker censoring script that rewrote part of the solution code: instead of [removed] use vindow.location with w
  2. solved! 1. add an ID to the categories, change line 1 of modules/blockcategories/category-tree-branch.tpl to: <li id="cat{$node.id}" {if isset($last) && $last == 'true'}class="last"{/if}> to tag each branch with its own id. 2. add following javascript in the js/tools/treeManagement.js before the closing bracket} of the $(document).ready(function () function: if (window.location.pathname=='/') { setTimeout("$('#cat99').children('span.grower').trigger('click')",500); setTimeout("$('#cat98').children('span.grower').trigger('click')",1000); } in my case it preopens category 99 and 98 with tiny delay of half of a second.
  3. Já mám jeden feed na jeden eshop, to mi stačí
  4. Můj feed jsem napsal takto a funguje bez problémů: <?php $shopUrl = "http://".$_SERVER['SERVER_NAME']; include(dirname(__FILE__).'/config/config.inc.php'); include('init.php'); error_reporting(0); $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); $products=Product::getProductsProperties(3, $p); header("Content-Type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> '; foreach ($products as $row) { $img=Product::getCover($row['id_product']); $manufacturerName=Product::getManufacturerName($row['id_product']); echo ' '.$manufacturerName['meta_title'].' '.str_replace("&", "&", $row['name']).' '.str_replace("&", "&",strip_tags($row['description_short'])).' '.$row['link'].' '.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg '.round($row['price_tax_exc']).' '.round($row['price_tax_exc'])*(round($row['tax_rate'])+100 )/100 .' 4 '.$manufacturerName['meta_title'].' '; } echo ''; ?> Nezapomeňte si nastavit id jazyku na funkci $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); já tam mám 4
  5. I found it! The file to be edited is: \classes\Search.php The lines from linenumber289 should look like this only 2rows and 1 attribute to the query have to be added : $weightArray = array( 'pname' => Configuration::get('PS_SEARCH_WEIGHT_PNAME'), 'reference' => Configuration::get('PS_SEARCH_WEIGHT_REF'), 'pareference' => Configuration::get('PS_SEARCH_WEIGHT_REF'), // add just this line here 'ean13' => Configuration::get('PS_SEARCH_WEIGHT_REF'), 'description_short' => Configuration::get('PS_SEARCH_WEIGHT_SHORTDESC'), 'description' => Configuration::get('PS_SEARCH_WEIGHT_DESC'), 'cname' => Configuration::get('PS_SEARCH_WEIGHT_CNAME'), 'mname' => Configuration::get('PS_SEARCH_WEIGHT_MNAME'), 'tags' => Configuration::get('PS_SEARCH_WEIGHT_TAG'), 'attributes' => Configuration::get('PS_SEARCH_WEIGHT_ATTRIBUTE'), 'features' => Configuration::get('PS_SEARCH_WEIGHT_FEATURE') ); $products = $db->ExecuteS(' SELECT p.id_product, pl.id_lang, pl.name as pname, p.reference, p.ean13, pl.description_short, pl.description, cl.name as cname, m.name as mname, pa.reference as pareference FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = p.id_category_default AND pl.id_lang = cl.id_lang) LEFT JOIN '._DB_PREFIX_.'manufacturer m ON m.id_manufacturer = p.id_manufacturer left join '._DB_PREFIX_.'product_attribute pa ON pa.id_product = p.id_product WHERE p.indexed = 0', false); // add just this line above this comment Than you have to go to your backend admin>preferences>search> and run complete indexation of all products.
  6. Development with this one http://www.nusphere.com/products/phped.htm is really confortable....
  7. Hi, Prestashop searches normally trough product.reference, but once a product has multiple attributes and each attribute has its own reference code, search engine of prestashop cannot find it. What should i change to make prestashop find a product whose attribute has reference code that i search? The File to be modified is probably \classes\Search.php Thank you for your help
  8. Gift wrapped can be removed just from admin user interface go to PREFERENCES
  9. Please help, it doesnt work. All my tree branches have assigned ids of their categories (eg. ) I tried to open the branch by calling javascript from firebug console, but openBranch($('ul.tree.dhtml li#cat98'), true); doesnt work at all. Can anyone please tell me what script should be call to open the branch? Thank you
  10. I already tried many combination, byt it seems that the tree can have only one category preopened.
  11. Hi that is what i wanted, but it still doesnt work properly. The only problem is that it works only for one category (The 1st one on the 0th level). the second one is not opened. I tried to call the javasctipt twice for more 0th level categories, but it always worked only for the first one: openBranch($('ul.tree.dhtml li#cat98'), true); openBranch($('ul.tree.dhtml li#cat99'), true); //mark this 'ul.tree' elements as already 'dynamized' this bahaved same: toggleBranch($('ul.tree.dhtml li#cat98')); toggleBranch($('ul.tree.dhtml li#cat99')); //mark this 'ul.tree' elements as already 'dynamized'
  12. Where can I assign the IDs of the categories of the tree that i want to have open by default? i would make some changes in the line 37 or 38 of the \js\tools\treeManagement.js where is executed the code during the pageload, but i dont know what. //collapse every expanded branch $('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide(); $('ul.tree.dhtml').show();
  13. Hi, Is there a possibility to have the category tree pre-opened just to its first level? I played with the sourcecode related to this topic that is here: \themes\prestashop\js\tools\treeManagement.js \modules\blockcategories\category-tree-branch.tpl but i didn't do anything generally usable. Can anyone help?
×
×
  • Create New...