add to cart HTML link

  • Posts: 163
  • Thank you received: 6
  • Hikashop Business
7 years 7 months ago #266938

-- url of the page with the problem -- : www.121time.com
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0
-- Browser(s) name and version -- : all

Hello Team,

Question regarding the add to cart products, sure you can help ;-)

We use Yootheme Zoo to present our products (each previously created in Hikashop) with a tag or a link to add them to the shopping cart; we have a cart module in our sidebar A. We force also a menu on checkout in order to have the correct url we want.

When our products (in Zoo page in a text area) have an add to cart link which is a tag like {product XXXX|cart}, the product is added to the mini cart located on the sidebar and we stay on the same page, working absolutely fine. Then when we click on the ”Proceed to checkout” in the minicart, we go to the log in and checkout page and we have the correct displayed url like www.121time.com/cart/checkout

But if the products (for instance all the DELANCE watches in our watch shop) have the HTML link like

”index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=74”

or even the new HTML link from Hika 3

" <a class="hikashop_html_add_to_cart_link" href=" 121time.com/index.php?option=com_hikasho...kout=1&product_id=74 ”>Add to cart</a>)"

the watches is also added to the cart but the new page is the checkout page with an url like www.121time.com/component/hikashop/checkout . We have the ”component/hikashop” in the url

Do you know why this (HIKA HTML) link doesn't add the product in the mini cart and stays on the same page, or why at least it doesn't "calls” the hidden cart menu in order the have the proper url for the checkout?

Of course we could just change the link for the tag {product XXXX|cart} in all our product pages, but since we have the same issue with the custom products we add in the cart, it would help us to understand first why this happens with "standards" products which have the HTML HIKA link also.

Thank you for your help

Jean-Loup

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 7 months ago #266951

Hi,

The add to cart link you give for the old and new are the same, so I don't see why you would get a different behavior.
One thing though is that if you want a consistent URL for the checkout on your website, you should select that checkout hidden menu in the "force a menu on checkout" setting of the HikaShop configuration.
Then you'll always get the correct URL on the checkout.

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

  • Posts: 163
  • Thank you received: 6
  • Hikashop Business
7 years 7 months ago #266980

thanks Nicolas,

I have already selected the force menu on checkout and it works perfectly with all product with the tag {product XXXX|cart}

but it doesn't work with the product added to cart with the link HTML. I still have the wrong url with these products (components/hika...)

You can try to add these 2 different products to the cart to see the behaviour:

www.121time.com/watches/edmond/pure/edmo...steel-automatic-44mm

www.121time.com/watches/delance/l-acier-...ay-steel-quartz-26mm

The second has the HTML link.

thanks...

JL

Last edit: 7 years 7 months ago by jean-loup.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 7 months ago #266994

Hi,

Then, you should change the HTML link. Instead of 121time.com/index.php?option=com_hikasho...kout=1&product_id=74 you should use:
121time.com/index.php?option=com_hikasho...duct_id=74&Itemid=XX where XX is the id of the menu item with the alias "cart" and the checkout should directly have the correct URL without needing the "force a menu on checkout" setting.

The following user(s) said Thank You: jean-loup

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

  • Posts: 163
  • Thank you received: 6
  • Hikashop Business
7 years 7 months ago #267001

Works fine, as usual ;-)
thanks!

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

  • Posts: 163
  • Thank you received: 6
  • Hikashop Business
7 years 7 months ago #267006

Hi Nicolas, maybe last question / explanation that would help please...

Why when I insert the tag {product XXXX|cart} I stay on the same page with the product added to the mini cart,
since when I enter the full HTML link I go directly on the checkout/log in page?

What would be the "add to cart" HTML link with the same effect than {product XXXX|cart}?

thanks for your help

JL

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 7 months ago #267045

Hi,

That's because with the tag, HikaShop adds javascript to the page so that it can handle the AJAX add to cart of HikaShop 3 and display the add to cart notification on the page and refresh the cart modules, like a normal add to cart button of a product page.
If you deactivate the notifications and not display the cart module on the page, the system will also redirect on the checkout as there is no other way to let the customer know that something happen, which is why the HTML link always redirects on the checkout because it doesn't have the necessary javascript to be able to do otherwise.

The following user(s) said Thank You: jean-loup

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

  • Posts: 163
  • Thank you received: 6
  • Hikashop Business
7 years 7 months ago #267046

Understood thanks

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

Time to create page: 0.072 seconds
Powered by Kunena Forum