Kogkalidis Posted June 2, 2013 Share Posted June 2, 2013 I have one free module from Land of Coder.. It shows the new products as carousel! Is it possible to edit it in a way to show the top sellers or the special products? Thank you Link to comment Share on other sites More sharing options...
vekia Posted June 2, 2013 Share Posted June 2, 2013 it's probably possible - but without an access to the module php code - is hard to say what you have to do. You said that this is free addon - where i can find it? Link to comment Share on other sites More sharing options...
PascalVG Posted June 2, 2013 Share Posted June 2, 2013 Not sure, but looks like they have a free module for featured products: http://www.landofcoder.com/download/free-extensions/viewcategory/54-lof-featured-products.html Give it a quick look. pascal Link to comment Share on other sites More sharing options...
vekia Posted June 2, 2013 Share Posted June 2, 2013 thanks for your url Pascal, im going to install their stuff can you please tell us more about module that you use? Is this addon that Pascal mentioned above? Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 3, 2013 Author Share Posted June 3, 2013 Yes and there is also one more of new products and I saw one guy selling one for the job that I need it (on addons) but it's like the free ones with a few modifications that I can do with your help one version is the mentioned above by Pascal and the other one is this http://www.landofcoder.com/prestashop/slider-a-slideshow/153-lof-new-products-prestashop-module.html Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 in the libs/groups/product you've got: function getListFeatured( $params ){ global $cookie, $link; $id_lang = intval($cookie->id_lang); if(_PS_VERSION_ >= "1.5") $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); else $category = new Category(1, Configuration::get('PS_LANG_DEFAULT')); $maxDesc = $params->get( 'des_max_chars',100); $limit_items = $params->get( 'limit_items',10); $listFeatured = $category->getProducts((int)(intval($cookie->id_lang)), 1, $limit_items); $listFeatured = Product::getProductsProperties($id_lang, $listFeatured); foreach( $listFeatured as &$product ){ $product['description']=substr(trim(strip_tags($product['description_short'])),0, $maxDesc); $product['price']=Tools::displayPrice($product['price']); $product = $this->parseImages( $product,$params ); $product = $this->generateImages( $product, $params ); } return $listFeatured; } instead $listFeatured = $category->getProducts((int)(intval($cookie->id_lang)), 1, $limit_items); you can use functions: Product::getPricesDrop(); ProductSale::getBestSales(), don't forget about function parameters. 1 Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 3, 2013 Author Share Posted June 3, 2013 in the libs/groups/product you've got: function getListFeatured( $params ){ global $cookie, $link; $id_lang = intval($cookie->id_lang); if(_PS_VERSION_ >= "1.5") $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); else $category = new Category(1, Configuration::get('PS_LANG_DEFAULT')); $maxDesc = $params->get( 'des_max_chars',100); $limit_items = $params->get( 'limit_items',10); $listFeatured = $category->getProducts((int)(intval($cookie->id_lang)), 1, $limit_items); $listFeatured = Product::getProductsProperties($id_lang, $listFeatured); foreach( $listFeatured as &$product ){ $product['description']=substr(trim(strip_tags($product['description_short'])),0, $maxDesc); $product['price']=Tools::displayPrice($product['price']); $product = $this->parseImages( $product,$params ); $product = $this->generateImages( $product, $params ); } return $listFeatured; } instead $listFeatured = $category->getProducts((int)(intval($cookie->id_lang)), 1, $limit_items); you can use functions: Product::getPricesDrop(); ProductSale::getBestSales(), don't forget about function parameters. So I edit only this and that's all? Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 I hope so Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now