Jump to content

view all products


Guest

Recommended Posts

Hi There

I was wondering if it´s possible to create a category "View all Products"

At the moment I have 7 Categories with approx/max 3 products in each...

I would love to create a category "View all Products" that shows all of them in one go. But I dont want to create the same product twice (2 different product numbers of the same product - will mess up the stock situation)

I´ve noticed that the feature is avalible i view all new products - And was thinking about linking to that blog - But I dont know how to controll the content of the new products blog - So that might not be the right solution. I will eventualy get more products...

I really hope that some of you good guys or girls out here can help me with a solution on this :)

Best wishes from
Sif

Link to comment
Share on other sites

Hi Guys

I really apreciate your respons - Cheers :)

But mys question is still - is it possible to make a "view all products" category

Like the feature thats available in view all new products (bottom og the blog)

It wont be the right solution just to make all the products featured - But I will for sure make use of that feature also. I just need to find a way arround "view all products" issue.

Best wishes and positive vibrations from
Sif

Link to comment
Share on other sites

I am attempting to help you here but have come across a strange problem which I could do with some assistance with having creted a new section all-products.php. I have tried to display more than one category in the array

$id_lang = $cookie->id_lang;
$categories = Db::getInstance()->ExecuteS('
SELECT c.id_category, link_rewrite, id_lang, DATE_FORMAT(date_add, \'%Y-%m-%d\') AS date_add
FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON c.id_category = cl.id_category 
WHERE `id_lang` = '.$id_lang);

foreach($categories as $category)
$cat_id = $category['id_category'];
{
$category = new Category($cat_id);
//print "Category ID: " . $cat_id . "
";
}




This in-fact this only displays the last category when it should be looping them all :-S
all I need a little assistance with the loop above to be able to create this mod.

For testing purposes I have even tried using an array.

example:
$cat_id = array(1, 2, 3, 4);
$category = new Category($cat_id);

this passes 1 product from each category so using foreach should loop all the categories
maybe I'm missing something simple here :red:

I know there is a few developers here so hope some one can assist me helping this person ;-)
it seems to me that only one category id can be past over using $category = new Category();

Link to comment
Share on other sites

No It´s not working yet!

I am using a temp solution where I have renamed the view all new products button - to view all products - It´s ok for now but I don´t know how to control this in the future - When I add more new products etc. What will then happen to the list?

So I would love to get your script working so the solution is solid...

Thank you again for your time and concern

Sif

Link to comment
Share on other sites

I think it only filters the newly added products!
But sice I´ve added all the products at the same time - When I created the shop they are all listed/filtered at the moment.

Link to comment
Share on other sites

There is no date/cookie or any other comparision in new products section, actually it only orders by date_add column and lists all the products for a given limit. So, you can use it as "all products" section by increasing the limit.

P.S. : If I am wrong please correct me.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
×
×
  • Create New...