Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Prices
Hello, can somebody help me with a sample code to retrieve the unit price of an item. I'm using the sample code provided by netsuite called webstore but doesn't work, it says "Price not available".
try {
$pricingMatrix = $record->getField('pricingList');
if ( !is_null($pricingMatrix) ) {
$pricesInRange = $pricingMatrix->getPricesFromPriceLevel("5", "1", true);
if ( !is_null($pricesInRange) && count($pricesInRange) != 0 ) {
?>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<?
foreach( $pricesInRange as $range => $price ) {
if ( $range == "1 and up" ) {
echo $price . " $<br/>";
} else {
?>
<tr>
<td align="center"><?php echo $range; ?></td>
<td align="center"><?php echo "$ " . $price; ?></td>