Jump to content

bibob

Members
  • Posts

    46
  • Joined

  • Last visited

1 Follower

Profile Information

  • Location
    Denmark
  • Activity
    Developer

Recent Profile Visitors

4,052,113 profile views

bibob's Achievements

  1. This may not work in case `position` 1 is not set for images in my case i have 4 images for a product which only have position 4,5,6 and 7 the best solution to quickly fix all missing cover value is to run UPDATE IGNORE ps_image f set f.cover = 1 where f.id_image = (SELECT t1.id_image FROM ps_image t1 JOIN ( SELECT MIN(id_image) AS min_value, id_product FROM ps_image GROUP BY id_product ) AS t2 ON t1.id_product = t2.id_product AND t1.id_image = t2.min_value where t1.id_product = f.id_product limit 1); UPDATE IGNORE ps_image_shop f set f.cover = 1 where f.id_image = (SELECT t1.id_image FROM ps_image_shop t1 JOIN ( SELECT MIN(id_image) AS min_value, id_product FROM ps_image_shop GROUP BY id_product ) AS t2 ON t1.id_product = t2.id_product AND t1.id_image = t2.min_value where t1.id_product = f.id_product limit 1); in case you will set the cover image according to the image with lowest position number, just change MIN(id_image) with MIN(position) , but the query i provided will just set the cover image for the first uploaded image which ahve the lowest image id
  2. Hello i was testing the customerservice imap setup and it works fine. it import and create new tickets in the customerservice tab. but i just wondered about something when customer dont use the built-in url inside the email(sent from BO "click here to reply") and just reply by their own mail platform. then the subject looks like "Re: [shopname] There is response to your message #ct34 #tcsuCEWTGIHyeN" but when this happend . the prestashop customerservice tab backend does not read this email and therefore the "reply from the customer" does not become assigned to the exsisting customer ticket . it seems it just ignore it The reason is that many customers dont use the url in the email. and just reply using their email program Hope my question is clear and someone know if it is possible to auto assign this email to the exsisting ticket instead of ignoring this email from the imap
  3. Found a solution DELETE FROM`ps_category` WHERE `id_category` != 1 and id_category not in (SELECT cp.id_category from ps_category_product cp ) ; DELETE FROM `ps_category_lang` where id_category not in (select id_category from ps_category); DELETE FROM `ps_category_group` where id_category not in (select id_category from ps_category); DELETE FROM `ps_category_shop` where id_category not in (select id_category from ps_category);
  4. Hello is there any way to bulk delete empty categories by a query from the database?
  5. HI. did you find a solution for that?
  6. SOLVED!!! really strange but prestashop set a limit of max 1000 discounts allowed. so i increased this value in classes/specificprice.php private static function filterOutField($field_name, $field_value, $threshold = 30000) before $threshold = 1000 also i would like to know if increasing this value from 1000 could cause any other issue. maybe for the cache limits or something ?
  7. i have created a normal product discount with amount and also as percent in the product admin and it is created succesfully the problem is that in the front end it still shows the normal price also in the cart. seems that there is something is still not applied. i have used prestashop for long time and never faced this issue I have disabled all non prestashop modules and also disabled all overrides and restored to default theme and still facing same problem
  8. Yes working on prestashop 1.6 also Create /override/controllers/front/CategoryController.php add <?php class CategoryController extends CategoryControllerCore { /** * Assign sub categories templates vars AND get product image from subcategory */ protected function assignSubcategories() { if ($subCategories = $this->category->getSubCategories($this->context->language->id)) { foreach($subCategories as &$subCategory ) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' select p.id_product, i.id_image, pl.link_rewrite from '._DB_PREFIX_.'category c1, '._DB_PREFIX_.'category c2 inner join '._DB_PREFIX_.'product p on (p.id_category_default = c2.id_category) inner join '._DB_PREFIX_.'image i on (i.id_product = p.id_product and i.cover = 1) inner join '._DB_PREFIX_.'product_lang pl on (p.id_product = pl.id_product) where c2.nleft >= c1.nleft and c2.nleft <= c1.nright and c1.id_category = '.(int)$subCategory['id_category']. ' order by p.date_add desc limit 0,1'); if(isset($result[0] ) ) { $subCategory['productimage'] = $result[0]['id_product'] . '-'. $result[0]['id_image']; $subCategory['imglinkrewrite'] = $result[0]['link_rewrite']; } } $this->context->smarty->assign(array( 'subcategories' => $subCategories, 'subcategories_nb_total' => count($subCategories), 'subcategories_nb_half' => ceil(count($subCategories) / 2) )); } } } add this to your theme/Category.tpl file {if $subcategory.id_image} <img src="{$link->getImageLink($subcategory.imglinkrewrite, $subcategory.productimage, 'medium_default')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> delete the file /cache/class_index.php
  9. Found solution ! Search::indexation(1);
  10. Hi iam trying to run this Controller::getController('AdminSearchConfController'); but it is not working i will try to rebuild index using this function. i dont want to provide url to this i tried with these and it is not working, it is running from a module Controller::getController('AdminSearchConfController'); Controller::getController('AdminSearchConfController')->run(); AdminController::getController('AdminSearchConfController')->run(); AdminController::getController('AdminSearchConfController'); Controller::getController('AdminSearchConfControllerCore'); Controller::getController('AdminSearchConfControllerCore')->run(); AdminController::getController('AdminSearchConfControllerCore')->run(); AdminController::getController('AdminSearchConfControllerCore'); hope someone can help
  11. If i use module to generate the sitemap, after it generates the 19 sitemaps iam getting https://www.dropbox.com/s/338di60y4zlsho0/Screenshot%202014-02-21%2013.24.26.png even after i increased the mas execution time to 12000
  12. Hi THanks for you reply. I have access to php.ini and i have increases max_ececuting time from 120 to 12000 as you see https://dl.dropboxusercontent.com/u/17796755/executingtime.png still only generate 19 sitemaps :/
  13. Hi i have setup a cron that runs each day to automaticly generate sitemap of my products actually it works fine, but it only generate 19 sitemap each of them contain about 2000 products, it means the 19 sitemaps contain 19x2000=38000 products. but i have 120.000 products on my webshop, there may be something wrong, as the 19 sitemaps have always stays as 19 files and never increased. also when i run it from url bar on the internet explorer it also just generate 19 sitemaps. in cron mode iam running this cron command wget http://www.domainhere.com/modules/gsitemap/gsitemap-cron.php?token=b06704d477\&id_shop=1 the output of email https://dl.dropboxusercontent.com/u/17796755/cron_for_sitemap_output.html hope someone can find out what could be wrong. thanks
  14. Thanks alot i will make some test and get back with results, as iam importing products and it is not finished yet, therefore i cant use the results before it is completed
×
×
  • Create New...