Closed KatieMFritz closed 4 years ago
I just added a SuperTable field to a product (the clothing product type that comes with Craft Commerce) and tested it. No issues there.
Here is my code for _event.html
:
{% extends 'shop/_layouts/main' %}
{% block main %}
<div class="mt-8">
<a href="{{ url('shop/events') }}">← All Events</a>
</div>
<div class="flex -mx-6 mt-8 product-details">
<div class="w-1/2 mx-6 p-8">
</div>
<div class="w-1/2 mx-6 p-8">
<h1>{{ event.title }}</h1>
{% if event.isAvailable %}
<form method="POST">
<input type="hidden" name="action" value="commerce/cart/update-cart">
{{ redirectInput('shop/cart') }}
{{ csrfInput() }}
<input type="number" name="qty" value="1">
<div class="field">
<select name="purchasableId">
{% for ticket in event.tickets %}
<option value="{{ ticket.purchasableId }}" {% if not ticket.isAvailable %}disabled{% endif %}>
{{ ticket.name }} - {{ ticket.price | commerceCurrency(cart.currency) }}
</option>
{% endfor %}
</select>
</div>
<div class="buttons">
<input type="submit" value="Add to cart" class="button"/>
</div>
</form>
{% else %}
<strong>Sold out</strong>
{% endif %}
</div>
</div>
{% endblock %}
Hi @engram-design, any updates on this?
@KatieMFritz Sorry for the delay in getting back to you. I've just tried a few combination of Super Table fields and can't seem to immediately replicate the issue. Can you share the Super Table field you have attached to your events? Hopefully with that, I can replicate this.
It does sounds like some sort of serialisation loop though. When you add something to your cart, the line item stores a current copy of the purchasable "thing" alongside the line item, which can also include custom fields.
I've made some improvements in 1.1.7 that might be worth trying out as well.
Sorry, haven't been able to test again lately! We've installed the latest version and I'll report back if we have problems.
Closing until further notice. Have also tested with 1.2.0
Description
I can create events and purchase tickets using the default templates from the craft commerce 3 alpha templates folder and the Events plugin suggested templates. However, if I save supertable data in an event, then adding a ticket for that event to my cart causes an infinite loop and a 504 gateway time-out error.
Here's an example of the code that's repeated over and over in 5
web.log
files after I do this (my supertable field is called "continuingEducation":I've tested a few times and can reliable reproduce the issue with different supertable fields. All other fields seem to work fine.
Steps to reproduce
Additional info