Finding out which custom field was selected by the customer in the order

Started by annpaul, May 13, 2023, 10:48:37 AM

Previous topic - Next topic

annpaul

Using VM 4.0.12 on Joomla 4.2.6

I have a base product (unpurchasable) with custom field having 3 options and a few subproducts (purchasable). When a customer purchases a product they are shown the custom field and they have to select one of the 3 options for that product.

Now, after the order is placed/checked out and payment is successful, I need to do some postprocessing. For that purpose, I am modifying vmplg/default.php  In this file, I am getting the order details but I am having a hard time getting a reference/id of the custom field option that the customer selected for a product. The following LOC gives me the view html for the selected custom field.


$customfieldsModel = VmModel::getModel('Customfields');
$customFields = $customfieldsModel->CustomsFieldCartDisplay($product);


But don't want the html stuff. I need something like the custom field id or name or something that uniquely identifies the custom field that was selected for that product in the order.

I searched the API but couldn't find a method that will give me those details.

Can someone please help?

thank you!