Change link add to cart

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

Hello My friends is possible when i click over "add to cart" go to some external hiperlink by example " www.google.com " this is possible on hikashop.

i Dont want cart system, i want reference system

Thanks and sorry for my bad english

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #156004

Hi,

The easiest way will be to not display the add to cart buttons by disabling them in the configuration and then edit views in order to add your custom button.

To have a dynamic comportment, I think that using custom fields can be a good thing. Create a custom field in the table "product" with the type "text", then in the product edition page, you can set a different url for each products.
Finally edit the view "product / listing_img_title" (for the product listing) and/or "product / show_default" (for the product page) and add custom code like:

<input type="button" class="button btn" onclick="javascript:window.location='<?php echo $this->element->CUSTOM_FIELD_NAME; ?>'" value="<?php echo JText::_('ADD_TO_CART'); ?>"/>

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

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

Thnks XAVIER, i m test . Best regards

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

Time to create page: 0.066 seconds
Powered by Kunena Forum