Does anyone know what is the form of PRESTASHOP's category URLs?
What if I want to use other parameters like pagination and number of products to get per request?
For instance, I need to get products under category_id = 33, page = 5, and 10 products per page?
I am hoping there is something similar to the URL of a product.
$productUrl = 'http://example.com/index.php?controller=product&id_product=' . $productId;
Thank you so much in advanced for any help. It is highly appreciated.
The basic category URL is
index.php?controller=category&id_category=<categoryId>
In theory the variables n
and p
should control the number of products and the page number respectively, but I haven't been able to get them to work very well.
index.php?controller=category&id_category=2&n=4&p=2
Depending on what you are doing, you may be able to use something like
{$link->getCategoryLink({$cat.id_category})}
in a template to generate a URL instead.
John, thank you so much for this. I'm bringing products for display purposes into another site. I'm using ajax for this and your answer is the last part of the puzzle I needed. Thanks you!