When a returning customer logs in, selected product attributes works fine. However when a customer uses the purchase without account (pwa) option, selected product attributes does not display either on the product confirmation page or on the order detail in the backend (admin) if the order is placed.

This is a difficult bug to track down; it took sometime to conclude that restore_contents() is the problem.

restore_contents() function is located in the shopping cart class.

To fix, go to catalog/includes/classes/shopping_cart.php

Look for function restore_contents() {

Then look for global $customer_id, $gv_id, $REMOTE_ADDR;

Add $languages_id to this line like so

global $customer_id, $gv_id, $REMOTE_ADDR, $languages_id;

or

global $customer_id, $gv_id, $languages_id, $REMOTE_ADDR;