Jump to content

newproducts block duplication issue


Recommended Posts

Hi i have duplicated the newproducts block to show new products from certain categories:

you can see here:

http://www.jewelleryrepublic.co.uk/

I am using the following code to display the blocks (id changes for the cat required etc)

    function hookRightColumn($params)
   {
       global $smarty;
       $currency = new Currency(intval($params['cookie']->id_currency));
       $category = new Category(18, intval($params['cookie']->id_lang));$newProducts = $category->getProducts(intval($params['cookie']->id_lang), 1, 2); 
       $new_products = array();
       if ($newProducts)
           foreach ($newProducts AS $newProduct)
               $new_products[] = $newProduct;

       $smarty->assign(array(
           'new_products' => $new_products,
           'mediumSize' => Image::getSize('medium')));
       return $this->display(__FILE__, 'blocknewproducts3.tpl');
   }




However rather than displaying the latest products it seems to show them based on the item posistion in that category, also is it possible to drill down in to all child categorys?

Version 1.3.2.3

Any ideas?

ta
Dave

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