How to change the position of the Add to cart button + Quantity field

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 1 month ago #350288

-- url of the page with the problem -- : tudor.jewelrygoldfinger.com/fr/collection/black-bay/m79540-0011
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.9
-- PHP version -- : 8.1.14

Hi,

I would need some help.

The site is currently in catalogue mode but I'll need to switch to a normal shop. As I'm using a custom display for products, I would need to display the quantity field + Add to cart button right before the Contact button.

Could you tell me how I can achieve this?

Thanks in advance for your help

Sandra

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #350289

Hi,

Edit your view file in the menu Display>Views. There, move the code between the tags

<!-- ADD TO CART BUTTON -->
and
<!-- EO ADD TO CART BUTTON -->
just before the code:
<a href="#contact" class="sppb-btn sppb-btn-default">contact</a>
which displays your contact button and that should do it.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 1 month ago #350298

Thanks a lot for your help Nicolas

Sandra

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 1 month ago #350362

Hi Nicolas,

So I added the code but didn't succeed to make it work. I tried to switch of editor and template to see if it could be the issue, but no result.

I enclose a screenshot of the result.

Sandra

Attachments:

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #350368

Hi,

Can you provide a screenshot of the code where you did the modifications ?
Because I don't see how you can end up with that result if you follow what I wrote.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 1 month ago #350380

Hi Nicolas,

1st screenshot is what I copy/paste
2nd is what happens when I save the page

Attachments:

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #350387

Hi,

This is a Joomla article.
How is that Joomla article displayed in the product page ?
You must have modified a view file of HikaShop, like the product / show_default view file, via the menu Display>Views to add the display of the Joomla article in it.
Instead of copying the PHP code from the HikaShop view file to your Joomla article (which is not possible, because it only supports HTML code), you should do the opposite and move the Joomla article HTML in the view file if you want to add PHP code in between the HTML which is actually in the Joomla article.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 1 month ago #350423

Hi Nicolas,

It's not a Joomla article, it's Hikashop articles, it's just that I wrote custom HTML to answer the Tudor's requirements. I haven't modified the show_default file.

Sandra

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
1 year 1 month ago #350433

Hi,

It's the same. You can't put PHP code inside the description itself. Only HTML is allowed in there.

In that case, what you could try is to use the add to cart content tag in your description:
www.hikashop.com/support/documentation/1...-product-insert.html
This might work.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 4 weeks ago #350445

Hi Nicolas,

Thank you so much for your help.

It sees it works fine like that.

Thanks again and enjoy your Sunday

Sandra

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

Time to create page: 0.054 seconds
Powered by Kunena Forum