Reputation: 13
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.
Upvotes: 1
Views: 5628
Reputation: 51
That's worked for me $this->context->link->getCategoryLink($categoryIdentifier)
Upvotes: 2
Reputation: 8415
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.
Upvotes: 3