- Posts: 431
- Thank you received: 22
Edit button Add to cart HTML link code
11 years 4 months ago #201775
by mojweb
Edit button Add to cart HTML link code was created by mojweb
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
How or where to edit code, which i get with Add to cart html link button in product part.
-- Joomla version -- : 3.4.1
How or where to edit code, which i get with Add to cart html link button in product part.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 4 months ago #201862
by Mohamed Thelji
Replied by Mohamed Thelji on topic Edit button Add to cart HTML link code
Hello,
Can you tell me what do you exactly want to change on the Add to cart html link button so that I can give you more information on how to do it ?
Thanks.
Can you tell me what do you exactly want to change on the Add to cart html link button so that I can give you more information on how to do it ?
Thanks.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201892
by mojweb
Replied by mojweb on topic Edit button Add to cart HTML link code
When i click "Add to cart HTML link" button, i get this code showing in popup
I want to customize that code. More precise, i want to add class btn-red. So admin dont need to change it every time.
Code:
<a class="hikashop_html_add_to_cart_link" href="http://www.shop.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=5">Add to cart</a>
I want to customize that code. More precise, i want to add class btn-red. So admin dont need to change it every time.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201895
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Edit button Add to cart HTML link code
Hi,
For the moment the generated code is directly in the HikaShop product controller.
So if you want to change that, you will need to modify the file (which is a core file so you will loose your modification next time you will update HikaShop).
File : administrator/components/com_hikashop/controllers/product.php
Code to edit
This "update cart link" should be improved in the future but I can't say more for the moment.
Regards,
For the moment the generated code is directly in the HikaShop product controller.
So if you want to change that, you will need to modify the file (which is a core file so you will loose your modification next time you will update HikaShop).
File : administrator/components/com_hikashop/controllers/product.php
Code to edit
Code:
function updatecart(){
echo '<textarea style="width:100%" rows="5"><a class="hikashop_html_add_to_cart_link" href="'.HIKASHOP_LIVE.'index.php?option='.HIKASHOP_COMPONENT.'&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id='.JRequest::getInt('cid').'">'.JText::_('ADD_TO_CART').'</a></textarea>';
}
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: mojweb
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201941
by mojweb
Replied by mojweb on topic Edit button Add to cart HTML link code
Thank you. This will do for the moment.
Please Log in or Create an account to join the conversation.
10 years 10 months ago #221796
by AntinJH
Replied by AntinJH on topic Edit button Add to cart HTML link code
Hi there !
This is exactely the answer to my question, but you posted this 6 month ago... Is there any new method or do I still have to modify the core file ?
Thanks.
This is exactely the answer to my question, but you posted this 6 month ago... Is there any new method or do I still have to modify the core file ?
Thanks.
Please Log in or Create an account to join the conversation.
10 years 10 months ago #221800
by nicolas
Replied by nicolas on topic Edit button Add to cart HTML link code
Hi,
It's still the same for now.
It's still the same for now.
Please Log in or Create an account to join the conversation.
3 years 9 months ago #347605
by mojweb
Replied by mojweb on topic Edit button Add to cart HTML link code
After all years, any news on that?
I need to do some changes to that link and I think that others to.
Can at least be added rel="nofollow"?
I need to do some changes to that link and I think that others to.
Can at least be added rel="nofollow"?
Please Log in or Create an account to join the conversation.
3 years 9 months ago #347608
by nicolas
Replied by nicolas on topic Edit button Add to cart HTML link code
Hi,
Indeed, this seems to have been lost.
I suppose that's because now people usually use the content tag mechanism ( www.hikashop.com/support/documentation/1...-product-insert.html ) which provides more functions like ajax add to cart, notification box, cart module refresh, etc like a normal HikaShop add to cart button while this uses the fallback add to cart mechanism.
We'll look into adding a view file for this for the next version so that you can easily change that with an override instead of that core file modification. It's an easy change so why not.
Indeed, this seems to have been lost.
I suppose that's because now people usually use the content tag mechanism ( www.hikashop.com/support/documentation/1...-product-insert.html ) which provides more functions like ajax add to cart, notification box, cart module refresh, etc like a normal HikaShop add to cart button while this uses the fallback add to cart mechanism.
We'll look into adding a view file for this for the next version so that you can easily change that with an override instead of that core file modification. It's an easy change so why not.
Please Log in or Create an account to join the conversation.
3 years 9 months ago #347627
by mojweb
Replied by mojweb on topic Edit button Add to cart HTML link code
We use this link in product descriptions. To insert second add to cart button at the end of the long description.
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds