Skip to main content

Change link add to cart

More
12 years 4 months ago #155977 by procomp
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.

More
12 years 4 months ago #156004 by Xavier
Replied by Xavier on topic Change link add to cart
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:
Code:
<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.

More
12 years 4 months ago #156103 by procomp
Replied by procomp on topic Change link add to cart
Thnks XAVIER, i m test . Best regards

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

Time to create page: 0.201 seconds
Powered by Kunena Forum