Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hi everyone,
For the Cart module, when you put a percentage value in the attributes, is it possible on the Front-end to display only the price in the drop-down list and hide the percentage after the price:
Thanks in advance
Nico
Offline
Anyone?
Offline
Do you mean to display something like -24,91 E ? (which is 71.38 percent of 34.90)
Offline
No just the value « 6 mois » without percentage
Last edited by Nico3939 (2020-05-05 20:54:26)
Offline
I have find Ajax_item_options.php in module-cart>application>js who contain this code:
$purchaseOption = '<fieldset>' . $LINE_END;
$purchaseOption .= '<input type="hidden" name="on' . $count . '" value="' . $attribute['title'] . '">' . $LINE_END;
$purchaseOption .= '<label for="os' . $count . '">' . $attribute['title'] . ': </label>' . $LINE_END;
if (count($attribute['options']) == 1) {
foreach ($attribute['options'] as $option) {
$purchaseOption .= '<span class="text_option">'.$option['title'];
$purchaseOption .= '</span>';
$purchaseOption .= '<input type="hidden" name="os' . $count . '" id="os' . $count . '" value="'.str_replace('"', '"', $option['title']).'">' . $LINE_END;
}
} else {
$purchaseOption .= '<select name="os' . $count . '" id="os' . $count . '">' . $LINE_END;
foreach ($attribute['options'] as $option) {
$purchaseOption .= '<option value="' . str_replace('"', '"', $option['title']) . '"';
if ($item != null && isset($item->options[$attribute['title']]) && $item->options[$attribute['title']] == $option['title']) {
$purchaseOption .= ' selected';
}
$purchaseOption .= '>' . $option['title'];
$purchaseOption . '</option>' . $LINE_END;
}
$purchaseOption .= '</select>' . $LINE_END;
}
$purchaseOption .= '</fieldset>' . $LINE_END;
return $purchaseOption;
}
Because of this with the web inspector:
But nothing happens
Nico
Offline
Pages: 1