Jump to content

featured products shown in categories as on homepage


D-O-M

Recommended Posts

I would like to have featured products shown in categories, as they are on homepage. I tried just to add code from homefeatured.tpl into category.tpl but it does not show them, probably because when I am in category xx I am not longer in category 1 so there is nothing to show. I was looking on http://www.prestashop.com/forums/viewthread/45415/third_party_modules/module_category_featured_products_v0_dot_2 and the thing is that module is for particular categories so if i was into using it i would have to define my featured products again and again for every single category, damn. So if anyone might know how to stick it together then i would be really happy.

Link to comment
Share on other sites

Problem is that home featured module by default can be hooked to homepage only.

If you want to hook it to categories you can try this.
If you have installed category featured module you already done first two steps from that topic.
So you will just need to add then in homefeatured.php add this

    public function hookcategoryFeaturedProducts($param)
       {
                return $this->hookHome($params);
            }



And transplant homefeatured module to category featured hook.
And remove category featured module from its hook in back office modules positions.

Link to comment
Share on other sites

you've got my pm? thanks again for your interest.

i asked in bad way, what i want is to get output of homefeatured to places like category and product page or even in page telling "Your message was succesfully sent...." after customer sent message through contact form :snake:

Link to comment
Share on other sites

For home featured module it was wrong function sorry this is working

    function hookcategoryFeaturedHook($params)
       {
                return $this->hookHome($params);
            } 



And for category featured module to display products from all categories in categoryfeatured.php replace

        LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.$lang_id.')
       where cfp.`id_category`='.Tools::getValue('id_category');


with

        LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.$lang_id.')';



You have two places to do that in hookcategoryFeaturedHook() and hookRightColumn().

And this is just quick change for front office, in back office it needs maybe more work so it is still lists of featured for each category.

Link to comment
Share on other sites

thank you for fast reaction, now it shows up, however without names of products :-D
my homefeatured shows - name, image, price and two links - "show product" (which do same as clicking on name or image) and "add to cart", which i clicked now and got stoned, there is some connection with ajax cart, which in scenario of homefeatured being hooked into category.tpl is gone, cause when i click on add to cart it adds all products from homefeatured or lets say category 1 (i have 15 in it) to cart in their full quantity, eg. 5000 pieces for every of these 15 :D and no price, i think i am doomed for ever, it must be some missing connection with needed variables or functions

edit: when i cut it out by commenting out that "public function hookcategoryFeaturedHook...." code from homefeatured.php it got back to normal functionality on homepage, clicking on add to cart adds just one piece of product i clicked on. however willing to have it hooked also in category makes it all crappy, i got desperate and dirty idea now - removing add to cart link from homefeatured.tpl, still there is that thing with missing names of products in output of homefeatured in category.tpl baah

Link to comment
Share on other sites

  • 1 year later...

Ours is Version 1.3.3.0

 

We have "Featured Auction Products" at the top which we will keep as it is. Those products are fetched on Home by "Auction" module. Below that we want "Featured Products" box and beow that "Featured Categories" would come.

 

I need module which will allow me to choose Products and also Categories [from BO] so that these selected

products and categories would be displayed on Home as "Featured Products" and "Featured Categories".

 

Products will be displayed on Home with their names, prices and partial short descriptions continued with dots..... No "Add to Cart" button but we may display View button.

 

Each row [or box] must accomodate FOUR products and i must be able to arrange those in my sequence. Any module which will fulfill these requirements?

 

 

Thanks!!!

Edited by Handcraft.co.in (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...