Jump to content

Archived

This topic is now archived and is closed to further replies.

Daamon

[Resolved] Database Has (Sort Of) Lost Previously Collected Mandatory Data - BUG in v5 Skin

Recommended Posts

14 minutes ago, bsmither said:

Is what I am looking at above, an order that has never been edited? Are you saying that even for orders that have not been changed, you have never seen the text-based options displayed on the Inventory tab?

@bsmither "Yes" to all questions. Correct.

18 minutes ago, bsmither said:

and that an unedited order will have the necessary data in the database table CubeCart_order_inventory "product_options" and "options_array" columns

...this is the stuff we checked earlier in this thread, right?

Share this post


Link to post
Share on other sites

Right.

Have we assured ourselves that your store does not have a plugin that uses the 'class.catalogue.display_product_options' hook?

I fear that we now need to get down and dirty about the level of troubleshooting we need to do. Please send me a PM with your email address.

Share this post


Link to post
Share on other sites

The original issue has been resolved. Details, courtesy of a LOT of offline help and investigation by @bsmither:

In the skins/mican/templates folder the Mican template file content.product.php, lines 86-90, where productOptions are being populated, the variable used is {$OPT.assign_id} but should be {$option.assign_id}.

A bug report has been filed: https://github.com/cubecart/v6/issues/1196

Apparently, this issue may well be present in a number of CC5 front-end skins.

This fix also addresses customer-entered text not showing on the Inventory tab: 

 

Share this post


Link to post
Share on other sites

When the customer is viewing the product, text-based product options have this form element. The first is the template code, the second line is an example of the rendered HTML:

<input type="text" name="productOptions[{$option.option_id}][{$option.assign_id}]"
<input type="text" name="productOptions[117][52]"

(The above is correct  for Foundation.)

Almost all other skins have a bug that has {$OPT.assign_id}, which causes the actual element to be rendered as, for example:

<input type="text" name="productOptions[117][]"

CubeCart then stores the chosen options as an array with zero as the second-level key - which is not correct. This causes all sorts of mayhem in later operations.

Share this post


Link to post
Share on other sites

×
×
  • Create New...