Hi @Mark_47 , you are using localStorage it seems you want to use the product info for the session for future use.
You can achieve the similar behaviour through mbox profile parameters. Fire a monitoring campaign and its parameters as profile parameters. Please refer below :
adobe.target.getOffer({
"mbox": "localMbox",
"params": {
"profile.productId": "12345",
"profile.productCategory":"Clothing"
},
"success": function(offer) {
adobe.target.applyOffer( {
"mbox": "localMbox",
"offer": offer
} );
},
"error": function(status, error) {
console.log('Error', status, error);
}
});
The profile.productId value will remain present for whole session . Hope that helps you