Skip Navigation

[Gelöst] Displaying Woocommerce Cart Message in Table product list view

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

The issue here is that the user created a custom archive page for their products and wanted the Add to Cart Message to show when they are using the AJAX add to cart settings in Woocommerce

Solution:

So the issue here is that the message doesn't work on Archive pages when using the AJAX add to cart.

Relevant Documentation:

The link below provides instructions on how this works.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-add-to-cart-message

This support ticket is created vor 6 Jahren, 5 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 6 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von jasonH-5 vor 6 Jahren, 4 Monaten.

Assistiert von: Shane.

Author
Artikel
#921209

Tell us what you are trying to do?

When user add item to cart that is not in stock or QTy that is over stock level need to show message.

Is there any documentation that you are following?

Added Shortcode into view but not displaying. I added this outside the loop as well on page and messages are not displaying.

Is there a similar example that we can see?

Here is my view code:

<!-- wpv-loop-start -->
<div class="product-table-view">
<table width="100%">
<thead>
<tr>
<th>Wire Size</th>
<th>Price</th>
<th>Certificate of Analysis - Material Certs</th>
<th>Quantity</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="loop-item-in-304-standard-draw-wire"]
</tr>
</wpv-loop>
</tbody>
</table>
</div>
<!-- wpv-loop-end -->

Thank you for any help you can provide

#921349

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Jason,

Thank you for contacting our support forum.

Does woocommerce display a message like this when you add to the cart when its over the available amount ?

Please let me know.
Thanks,
Shane

#921362

Yes the traditional cart message is showing at the top of the cart page and the standard product page.

Thank you for your assistance.

#921388

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Jason,

Would you mind providing me with admin access to the site as well as a link to the page so that I can have a look as well.

Thanks,
Shane

#922539

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Jason,

I think this one is a bug as i've tested it on a fresh install and it doesn't work as well. I've escalated this to our 2nd tier supporters for further debugging.

Thanks,
Shane

#923192

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Jason,

So the issue here is that the message doesn't work on Archive pages when using the AJAX add to cart.

I've disabled it and the message should now start to show up.

Please let me know if this helps.

Thanks,
Shane

#953171

Problem is that I need AJAX cart to stay enabled. If I disable AJAX cart my Extra Product Options on achieve pages will not work.