Jump to content

Associated with the category products show


Recommended Posts

Hi All,

 

I would like to view the products in a blog, but I want to associate with a select category of these products.

How do we do this?

	public function hookRightColumn($params)
	{       
		if (Configuration::get('PS_CATALOG_MODE'))
			return;
                
                $this->_prepHook($params);
                
                $specials_product = Product::getPricesDrop((int)$params['cookie']->id_lang, 0, Configuration::get('FIELD_SPECIALPLS_NBR'));
                    
                $this->smarty->assign(array(
                        'specials' => $specials_product,
                        'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
                        'mediumSize' => Image::getSize(ImageType::getFormatedName('medium'))
                ));

                if(Configuration::get('FIELD_SPECIALPLS_VERTICAL'))
                    return $this->display(__FILE__, 'fieldspecialproduct_vertical.tpl');
                else
                    return $this->display(__FILE__, 'fieldspecialproduct.tpl');
		
	}

Thanks

Link to comment
Share on other sites

Hi All,

 

I would like to view the products in a blog, but I want to associate with a select category of these products.

How do we do this?

	public function hookRightColumn($params)
	{       
		if (Configuration::get('PS_CATALOG_MODE'))
			return;
                
                $this->_prepHook($params);
                
                $specials_product = Product::getPricesDrop((int)$params['cookie']->id_lang, 0, Configuration::get('FIELD_SPECIALPLS_NBR'));
                    
                $this->smarty->assign(array(
                        'specials' => $specials_product,
                        'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
                        'mediumSize' => Image::getSize(ImageType::getFormatedName('medium'))
                ));

                if(Configuration::get('FIELD_SPECIALPLS_VERTICAL'))
                    return $this->display(__FILE__, 'fieldspecialproduct_vertical.tpl');
                else
                    return $this->display(__FILE__, 'fieldspecialproduct.tpl');
		
	}

Thanks

 

this query :

$specials_product = Product::getPricesDrop((int)$params['cookie']->id_lang, 0, Configuration::get('FIELD_SPECIALPLS_NBR'));

I changed it :

$specials_product = Product::getProducts((int)$params['cookie']->id_lang, 0,10, 'id_product', 'DESC', 137, true);

 

He sees the product category No. 137 in the query but does not bring pictures and linked.

How can I change the images and links to query?

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...