Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-4094

Buyer can not checkout product budle where product options are DYNAMIC

    Details

      Description

      Create 2 Products product A and product B. Make sure they have SKU, price and they have some inventory values set.

      Create Product Bundle Super Bundle:

      • add option Action Product, set option price type is DYNAMIC
      • add two values to option and link them to product A and Product B
      • add one dummy option with type TEXT, leave it optional

      1) Go to front store
      2) locate Super Bundle
      3) Add to Cart
      4) go and checkout cart

      Checkout fails with exception:

      Caused by: com.liferay.portal.kernel.json.JSONException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
      	at com.liferay.portal.json.JSONArrayImpl.<init>(JSONArrayImpl.java:60)
      	at com.liferay.portal.json.JSONFactoryImpl.createJSONArray(JSONFactoryImpl.java:150)
      	at com.liferay.commerce.product.internal.option.CommerceOptionValueHelperImpl.toCommerceOptionValues(CommerceOptionValueHelperImpl.java:144)
      	at com.liferay.commerce.checkout.web.internal.display.context.OrderSummaryCheckoutStepDisplayContext._getCommerceProductPrice(OrderSummaryCheckoutStepDisplayContext.java:200)
      	at com.liferay.commerce.checkout.web.internal.display.context.OrderSummaryCheckoutStepDisplayContext.getCommerceProductPrice(OrderSummaryCheckoutStepDisplayContext.java:154)
      	at org.apache.jsp.checkout_005fstep.order_005fsummary_jsp._jspService(order_005fsummary_jsp.java:598)
      	... 226 more
      Caused by: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
      	at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
      	at org.json.JSONArray.<init>(JSONArray.java:106)
      	at org.json.JSONArray.<init>(JSONArray.java:144)
      	at com.liferay.portal.json.JSONArrayImpl.<init>(JSONArrayImpl.java:57)
      	... 231 more
      2020-06-12 15:04:24.450 ERROR [http-nio-8080-exec-7][render_portlet_jsp:131] null
      org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
      	at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
      	at org.json.JSONArray.<init>(JSONArray.java:106)
      	at org.json.JSONArray.<init>(JSONArray.java:144)
      	at com.liferay.portal.json.JSONArrayImpl.<init>(JSONArrayImpl.java:57)
      	at com.liferay.portal.json.JSONFactoryImpl.createJSONArray(JSONFactoryImpl.java:150)
      	at com.liferay.commerce.product.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lorenzo.lapescara Lorenzo La Pescara
              Reporter:
              igor.beslic Igor Beslic
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  2.1.2