How to link directly to a variante of the product

  • Posts: 6
  • Thank you received: 0
6 years 2 months ago #285727

Hi,
I'm wondering if it is possible to call a variante with an URL, rather than the general product itself ?
If that's possible, how to do it -i.e find the URL to the variante- ?
Thanks,

Garl

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
6 years 2 months ago #285729

Hi,

Yes no problem.
When you access a product page, you have by default a URL like that:
/menu-item-alias/product/ID-alias.html
The id is the id of the main product.
If you replace that id by the id of the variant, you'll access the product with that variant preselected.

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
6 years 2 months ago #285760

Thank you very much Nicolas ! But how do you find the id of the variant ?

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
6 years 2 months ago #285768

Hi,

Go in the menu System>Mass actions, create a new mass action with a filter on the product_parent_id equal to the ID of your product (you can find it on the products listing on the right side) and an action "display the results" with the product_id and other columns to identify the variants. When you click on the "process" button, you'll get a listing of the variants of that product with their ID.

Please Log in or Create an account to join the conversation.

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
3 years 8 months ago #322229

I, also, am looking for instructions on how to build a Direct Link to a pre-configured Variant of a Product that has two Characteristics.

I've followed these instructions, and it links to a page which displays the correct Product title, but because of the AJAX driven options, none of the selections are made and no "Add To Cart" button appears.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 8 months ago #322247

Hi,

I suppose that it's because of the "Characteristics dynamic display" option you have activated in your HikaShop configuration.
That setting didn't exist when I answered previously with the URL solution:
www.hikashop.com/forum/product-category-...-product.html#285729
With that option activated, the variant pre-selection based on the id in the URL is not supported. That would require some development to support it.
In the mean time, I would recommend to turn off that option and it will work like before.

Please Log in or Create an account to join the conversation.

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
1 year 1 month ago #348958

Hi there! Is there a newer solution to linking directly to product variants? And, more specifically within search results?


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 1 month ago #348961

Hi,

None that I know of. The search is done on the products, not the variants.

Please Log in or Create an account to join the conversation.

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
1 year 1 month ago #348971

I have ‘search variants’ enabled in the search plugin. If that setting doesn’t add variants to search results, what does it do?


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 1 month ago #348976

Hi,

It makes it so the search plugin will search in the data of the variants, not just the data of the main products. If it finds a match in a variant, it will provide the URL of the main product of the variant. If the main product doesn't have a canonical URL and the URL can be generated dynamically, it will use the id of the variant instead of the id of the main product in the URL. This can allow the system to preselect the default variant selected when reaching the product page, overriding the default variant.
This might indeed be a solution if you're using the Joomla search mechanism.
Note however that this mechanism has been removed in Joomla 4 to have instead the "smart search", which doesn't have that capability.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
  • Hikashop Business
8 months 1 week ago #353483

Hi there, I am also trying to create a link to a variant of a product. I did find the ID, however our SEO settings make the link for the product look like something without an id..and when I change the settings to show the ID's, none of the pages will work anymore..

our direct link to the main product would be 3dstudio.nl/webshop/product/v-ray , is there an easy way to add something to this to get the variant? (id = 291)


Thank you in advance!

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 months 1 week ago #353490

Hi,

Yes, the URL should then be:
3dstudio.nl/webshop/product/291-v-ray
Note however that you have the "Characteristics dynamic display" setting turned on in the HikaShop configuration page. In that case, there is no pre selected variant when the page is displayed since the system will ask you to choose each characteristic one after the other.
So if you want this URL to display that variant 291 when this id is in the URL, you need to turn off that setting.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 2
  • Hikashop Business
8 months 1 week ago #353541

thank you, this works!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum