Показать сообщение отдельно
  #4 (permalink)  
Старый 02.11.2012, 16:30
Новичок на форуме
Отправить личное сообщение для Snek17 Посмотреть профиль Найти все сообщения от Snek17
 
Регистрация: 02.11.2012
Сообщений: 2

Добрый день. Та же ситуация, куда вставлять функцию помогите пожалуйста!

price.tpl.php
<?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"] ) && ( !$parent_has_children) ) ) {
	
	$link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&amp;product_id='.$product_id.'&amp;subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
	echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );
}
?>

<?php
// DISCOUNT: Show old price! Inline style specified for PDF creation, remove it if you don't need it
if(!empty($discount_info["amount"])) {
	?>
	<span class="product-Old-Price" style="color:red;text-decoration:line-through;">
		<?php echo $CURRENCY_DISPLAY->getFullValue($undiscounted_price); ?></span>
	
	<br/>
	<?php
}
?>
<?php
if( !empty( $price_info["product_price_id"] )) { ?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".inputboxattrib").change(function () {
jQuery('span.productPrice').replaceWith('<span class="productPrice">'+jQuery(".inputboxattrib option:selected").attr("title")+'</span>');
})
});
</script>
	<span class="productPrice">
		<?php echo $CURRENCY_DISPLAY->getFullValue($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"]);
	}
}
?>



addtocart_advanced_attribute.tpl.php
<?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;text-align:right;margin:3px;">
        <label for="<?php echo $attribute['titlevar'] ?>_field"><?php echo $attribute['title'] ?></label>:
    </div>
    <div class="vmAttribChildDetail" style="float:left;margin:3px;">
        <select class="inputboxattrib" id="<?php echo $attribute['titlevar'] ?>_field" name="<?php echo $attribute['titlevar'].$attribute['product_id'] ?>">
		<?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 
} ?>
Ответить с цитированием