Jump to content

Link to Category/Product?


Recommended Posts

Hi.

I am in the process of setting up my new site/shop, and was looking for an easy way to put links on my main website (www.TheCrystalWizard.co.uk) to particular sections of my shop (www.TheCrystalWizard.co.uk/shop).

 

e.g. a Link from my Home page, mentioning Dark Flights Art's new pendants, linking directly to the Dark Flights manufacturer section of my shop.

 

It looks like I can do this by manually copy/pasting the URL from the shop, but I was wondering if there was an easier/tidier way?

 

It is all in TEST phase at the moment, so please dont' be alarmed by lorem ipsum sections and lack of content! I am hoping to get some wrinkles smoothed out before committing to GO Live!

Link to comment
Share on other sites

Hi,

If you need to grab the link from the templates, you can use {$link->getProductLink($id_product, $link_rewrite)} for products, or the equivalent getCategoryLink with a category id and link rewrite for as parameters. From a php file, use $this->context->link and the same methods and args :)

Link to comment
Share on other sites

  • 3 months later...

Could you elaborate a bit on "From a php file, use $this->context->link and the same methods and args"?

 

I'm essentially trying to generate product links (to save in a CSV file) and my head hurts from trying to figure this out. :wacko:

 

I have the product id - now I want to use that in a loop to generate the URL (and product cover image URL as well).

 

Thanks.

Edited by rseigel (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...