Create product link in article

  • Posts: 307
  • Thank you received: 22
11 years 4 months ago #153996

Hi,
I've been looking for the possibilitie to create a link to a Hikashop product with a custom text.

Something like a text "Buy this product" that links to a product detail page.

Tried it with the plugin at the bottom of the article editor but could not get it right.
Did I do this wrong of is it not possible this way ?

Thanks for any tips !

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.2.3

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #154000

Hello,
A solution can be to use the following plugins to add your products link to your Joomla articles :
- Hikashop product TAG insertion
- Hikashop product TAG translation

Here is the documentation for more information : www.hikashop.com/index.php/support/docum...-product-insert.html

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

  • Posts: 307
  • Thank you received: 22
11 years 4 months ago #154081

Hi Mohamed,

Thanks for your reply.
Unfortuntely this is not what I am looking for.
I've been trying these plugins but I cannot create a link from my own text to a product this way (I still hope I'm wrong and that it is possible ;) ).

In that case I will have to create a link by copying the link from the product detail page an create it by hand.
It will be less "change proof" but it will work for now.

Maybe there are more customers who would like a feature like this and we can see it in the future ?

Thanks again !

Nico

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #154097

Hi Nico,
Sure, we can maybe add an option through the product insert plugins so that you can add a custom text instead of your product name.
I'll add it on our todo list :).

The following user(s) said Thank You: nico.van.leeuwen

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

  • Posts: 71
  • Thank you received: 0
11 years 1 month ago #166204

Hi Mohamed,

Anything new on this? I'm also looking for a possibility of linking custom text to our products.

Thanks,
Michel

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

  • Posts: 84300
  • Thank you received: 13697
  • MODERATOR
11 years 1 month ago #166214

Hi,

Mmm. I'm not sure that everyone is talking about the same thing here.
If you want a link to a product page, you can directly enter the HTML of a A tag wherever you want with the href attribute containing the URL of the product in that way: mywebsite.com/index.php?option=com_hikas...=show&product_id=XXX
You can have the text you want in your A tag.

Regarding the possibility of changing the product name of the link generated by the HikaShop tag system to something else stored in a custom product field of the product, it's actually quite easy to do.
First, copy the file plugins/system/hikashopproductinsert/hikashopproductinsert_view.php to templates/YOUR_TEMPLATE/system/hikashopproductinsert_view.php and edit that copy and change the line:
echo $product->product_name;
to:
echo $product->FIELD;
where FIELD is the column name of the custom field. That's it. You'll now be able to create links to the product page with the text of the link coming from a custom field of the product.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum