Оформляйте понятнее. А то мозг сломать можно.
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
$link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&product_id='.$product_id.'&subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );
}
?>
<?php
// DISCOUNT: Show old price!
if(!empty($discount_info["amount"])) {
?>
<span class="product-Old-Price">
<?php echo $CURRENCY_DISPLAY->getFullValue($undiscounted_price); ?></span>
<br/>
<?php
}
?>
<?php
if( !empty( $price_info["product_price_id"] )) { ?>
<script type="text/javascript">
jQuery(function() {
jQuery('option').click(function() {
if(jQuery(this).attr("title") != '') {
jQuery('span.productPrice').replaceWith('<span class="productPrice">' + jQuery(this).attr("title") + '</span>');
}
else {
jQuery('span.productPrice').replaceWith('<span class="productPrice"><?php echo $CURRENCY_DISPLAY->getFullValue($base_price) ?></span>');
}
return false;
});
});
</script>
<span class="productPrice">
<?php echo $CURRENCY_DISPLAY->getFullValue($base_price) ?> <?php echo $base_price ?>
<?php echo $text_including_tax ?>
</span>
<?php
}
echo $price_table;
?>
<?php
// DISCOUNT: Show the amount the customer saves
if(!empty($discount_info["amount"])) {
echo "<br />";
echo $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_SAVE').": ";
if($discount_info["is_percent"]==1) {
echo $discount_info["amount"]."%";
}
else {
echo $CURRENCY_DISPLAY->getFullValue($discount_info["amount"]);
}
}
?>
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
foreach($attributes as $attribute) {
?>
<div class="vmAttribChildDetail" style="float: left;width:30%;text-align:right;margin:3px;"> бля
<label for="<?php echo $attribute['titlevar'] ?>_field"><?php echo $attribute['title'] ?></label>:
</div>
<div class="vmAttribChildDetail" style="float:left;width:60%;margin:3px;">
<select class="inputboxattrib" id="<?php echo $attribute['titlevar'] ?>_field" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>"> <?php echo ($options_item) ?>
<?php foreach ( $attribute['options_list'] as $options_item ) : ?>
<?php if( isset( $options_item['display_price']) ) : ?>
<option title="<?php echo $options_item['display_price'] ?>" value="<?php echo $options_item['base_var'] ?>"><?php echo $options_item['base_value'] ?> (<?php echo $options_item['sign'].$options_item['display_price'] ?>)</option>
<?php else : ?>
<option value="<?php echo $options_item['base_var'] ?>"><?php echo $options_item['base_value'] ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
<br style="clear:both;" />
<?php
} ?>
Дала пойдут быстрее если вы результирующий фрагмент html покажете. И js скрипт впридачу.
Кстатии ссылка пример не работает.