• It looks like this plugin is designed to assume that each product on a form will have a quantity of 1. That is not the case when using conditional logic to show/hide a product.

    I have 4 potential products and only 1 will be selected on my form. The others do not need to be passed to Chase at all because they (by default) have a quantity of 0. They only receive a quantity of 1 when the user makes a selection.

    Is the fix as simple as editing line 458 to start with quantity = 0? Or does more code need to be written to check if there is a value on a given line item to begin with?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter tsteingard

    (@tsteingard)

    These edits to lines 455 and 458 seem to fix my issue. Please consider altering the plugin so that this fix is maintained.

    455 if ($field->type == "option" || ($field->type == "product" && (isset($quantities[$field->id]) || isset($product[2])))) {

    458 $quantity = 0;

    I’m curious to know why the quantity was set to 1? Was there another prior use case where 1 was necessary? Does this change have other implications?

    • This reply was modified 4 years, 11 months ago by tsteingard.
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with conditional logic’ is closed to new replies.