const detailsData = $('form').serializeArray()
let details = {};
for (let i = 0; i < detailsData.length; i++) {
details[detailsData[i]['name']] = detailsData[i]['value'];
}
var formData = {
'details': details,
'items': JSON.parse(Cookies.get('basket')),
'visitor': <?php echo (!empty($visitor)) ? json_encode($visitor) : null; ?>
};
console.log(formData);
@$data->{'id'}
$data['id']
SELECT ..... FROM .... WHERE (CODE: `id` = value OR `code` = value) .... other predicates....