Add to cart button when no stock

  • Posts: 54
  • Thank you received: 7
2 years 4 days ago #340396

Hi,

Whenever a product is out of stock, the add to cart button gets removed.
But since my add to cart button has a position of relative, some parts of my product page break.
Is it possible to always keep the add to cart button, but whenever a product is out of stock, instead of removing it it becomes unclickable?
Or any other solution will do.

This message contains confidential information


Thanks in advance,

Ismael

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
2 years 4 days ago #340397

Hello,

We can suggest to use some css to "simulate" a shutdown button, as shown on my screenshot :


"Click to better see screenshot details"

Note : In order to learn how to add custom css command, have a look on this documentation .

Now for your display issue, a little like already said on another topic, your frontend is is very largely customized, by custom css commands, overrides coming from your template, and more, and your display problems seem to come directly from these customization, now which one will be complicated.
Hope this will help you to achieved what you need.

Regards

Last edit: 2 years 4 days ago by Philip.
The following user(s) said Thank You: ismael

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

  • Posts: 54
  • Thank you received: 7
1 year 11 months ago #340582

Hi,

I added the button but now i have another issue.
When product is not in stock its working fine.
My code:
div#hikashop_product_right_part div#hikashop_product_quantity_main.hikashop_product_quantity_main:after {
content: 'Aan Winkelwagen Toevoegen';
display: inline-block;
border: 1px solid #eee;
width: 225px;
color: white;
background-color: #185EA7!important;
height: 35px;
padding-top: 7px;
padding-left: 13px;
border-radius: 3px;
opacity: 70%;
margin-bottom: 40px;
left: 16px;
position: relative;
}

Whenever the product is in stock it now shows 2 buttons.
Screenshot in attachments.

Attachments:
Last edit: 1 year 11 months ago by ismael.

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
1 year 11 months ago #340587

Hello,

In order to avoid this issue, you have to use a more specific class that is relative to the state "no stock", see my screenshot :



Hope this will help you to achieved what you eed.
Regards

Last edit: 1 year 11 months ago by Philip.
The following user(s) said Thank You: ismael

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

  • Posts: 54
  • Thank you received: 7
1 year 11 months ago #340602

Hi,

Thanks, working fine!

The following user(s) said Thank You: Philip

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

Time to create page: 0.068 seconds
Powered by Kunena Forum