Skip to main content

How can use add to cart button on externa php file

More
10 years 8 months ago #227876 by kaya
-- HikaShop version -- : 2.6.x
-- Joomla version -- : 3.4.8

Hi dear
I develop my custom extension and and need add hikashop add to cart button in my php file.
How can do it? thank you.

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

More
10 years 8 months ago #227887 by Xavier
Hi,

When editing a product in the backend, you can find a button "Add to cart HTML link" in the toolbar.
This will give you the code of a button to add this specific product to the cart, so you can use it and adapt it with some PHP to have to correct product ID and quantity.

Here is an example of code for that button:
Code:
<a class="hikashop_html_add_to_cart_link" href="http://website.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=4">Add to cart</a>
The following user(s) said Thank You: kaya

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

More
10 years 8 months ago #228067 by kaya
Thank you dear Xavier

Now I used your code and not load hikashop framework on my php file?

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

More
10 years 8 months ago #228077 by Jerome
Hi,

I'm afraid that I do not understand your message.
Xavier gave you a working code ; you do not need more to make it work.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

Time to create page: 0.211 seconds
Powered by Kunena Forum