-
tiago casagrande
-
-
OFFLINE
-
Aprendiz
-
- Postagens: 7
-
Karma: 0
-
|
O pedaço que corrigi: $preco = strip_tags($product_price); // recebe a variável $product_price e transforma em número
$preco = str_replace("R$", "", $preco);
$preco = str_replace(",", ".", $preco); // retira o ponto para ficar apenas número na hora do calculo
// fator de multiplicação do Pagseguro
O flypage todo: <?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
<?php
$flypageWidth = $this->get_cfg('flypageWidth');
$toggle = $this->get_cfg('toggleImages');
$cursorZoom = $this->get_cfg('cursorZoom');
$imagePath = IMAGEPATH.'product/';
list($details_width, $width) = $this->vmGetImageSize($imagePath, $product_thumb_image, $flypageWidth);
echo $this->vmFlypageImagesToggle(VM_THEMEURL);
$widthCollapse = $width;
?>
<div class="vmFlyPageTop v3FlyPageTop">
<?php
if( $this->get_cfg( 'showPathway' )) {
echo "<div class=\"pathway\">$navigation_pathway</div>";
}
?>
<script src="<?php echo VM_THEMEURL ?>js/jqzoom.pack.1.0.1.js" type="text/javascript"></script>
<script src="<?php echo VM_THEMEURL ?>js/jquery.jqzoom1.0.1.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo VM_THEMEURL ?>css/jqzoom.css" />
<script type="text/javascript"> jQuery.noConflict(); </script>
<script type="text/javascript">
jQuery(function() {
jQuery(".jqzoom").jqzoom();
});
</script>
<div class="vmImagesMain v3ImagesMain" style="width:<?php echo $width + 10; ?>px;">
<?php
/*if ($this->get_cfg('showButtons') == 1) {
echo $buttons_header.'<br style="clear:both">';
}
*/
?>
<div class="vmProductImage v3ProductImage" style="width:<?php echo $width; ?>px;"><center>
<?php if ($cursorZoom == 1) {
echo $this->jqZoomIncludes(VM_THEMEURL,$product_id);
?>
<script type="text/javascript"> jQuery.noConflict(); </script>
<a href="<?php echo IMAGEURL ?>product/<?php echo $product_full_image ?>" target="_blank" rel="lightbox" class="jqzoom<?php echo $product_id; ?>" title="<?php echo $product_name ?>">
<?php echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"' ) ?></a>
<a href="<?php echo IMAGEURL ?>product/<?php echo $product_full_image ?>" rel="lightbox" target="_blank" title="<?php echo $product_name ?>">Clique aqui para ampliar</a>
<?php } else { ?>
<?php echo $product_image;
}
?>
</center></div>
<?php echo $this->vmlistPBVAdditionalImages( $toggle, $widthCollapse, $product_id, $images ) ?>
<div id="vmAskSeller" style="width:229px"><?php echo $ask_seller ?></div>
<div class="vmRelated v3Related">
<?php echo $related_products ?>
</div>
</div>
<div class="vmDetails v3Details" style="float:right;width:<?php echo $details_width;?>px">
<div class="vmProductNav v3ProductNav">
<?php
/*
if( $this->get_cfg( 'product_navigation', 1 )) {
if( !empty( $previous_product )) {
echo '<a class="previous_page" href="'.$previous_product_url.'">previous product</a>';
}
if( !empty( $next_product )) {
echo '<a class="next_page" href="'.$next_product_url.'">next product</a>';
}
}
*/
?></div>
<p class="vmProductName v3ProductName"><font size="3"><?php echo $product_name ?></font> <?php echo $edit_link ?></p>
<div class="vmProductPrice v3ProductPrice">
<?php
$product_price = str_replace(" ", "", $product_price);?>
<b><font size="4"><?echo $product_price ?></font></b><br>
<?
$preco = strip_tags($product_price); // recebe a variável $product_price e transforma em número
$preco = str_replace("R$", "", $preco);
$preco = str_replace(",", ".", $preco); // retira o ponto para ficar apenas número na hora do calculo
// fator de multiplicação do Pagseguro
$taxa1 = 1;
$taxa2 = 0.51495;
$taxa3 = 0.34670;
$taxa4 = 0.26255;
$taxa5 = 0.21210;
$taxa6 = 0.17847;
$taxa7 = 0.15446;
$taxa8 = 0.13645;
$taxa9 = 0.12246;
$taxa10 = 0.11127;
$taxa11 = 0.10212;
$taxa12 = 0.09450;
?>
<table width="80%" border="0" cellpadding="0" cellspacing="0" style="font-size:10px">
<caption></caption>
<tbody style="text-align: center;">
<tr style="text-align: center;">
<td style="text-align: center;"><span style="color: #262626;"><strong>à vista </strong><?php echo 'R$ '.number_format($preco*$taxa1, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>5 x </strong><?php echo 'R$ '.number_format($preco*$taxa5, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>9 x </strong><?php echo 'R$ '.number_format($preco*$taxa9, 2, ',', '.'); ?></span></td>
</tr>
<tr style="text-align: center;">
<td style="text-align: center;"><span style="color: #262626;"><strong>2 x </strong><?php echo 'R$ '.number_format($preco*$taxa2, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>6 x </strong><?php echo 'R$ '.number_format($preco*$taxa6, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>10 x </strong><?php echo 'R$ '.number_format($preco*$taxa10, 2, ',', '.'); ?></span></td>
</tr>
<tr style="text-align: center;">
<td style="text-align: center;"><span style="color: #262626;"><strong>3 x </strong><?php echo 'R$ '.number_format($preco*$taxa3, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>7 x </strong><?php echo 'R$ '.number_format($preco*$taxa7, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>11 x </strong><?php echo 'R$ '.number_format($preco*$taxa11, 2, ',', '.'); ?></span></td>
</tr>
<tr style="text-align: center;">
<td style="text-align: center;"><span style="color: #262626;"><strong>4 x </strong><?php echo 'R$ '.number_format($preco*$taxa4, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>8 x </strong><?php echo 'R$ '.number_format($preco*$taxa8, 2, ',', '.'); ?></span></td>
<td style="text-align: center;"><span style="color: #262626;"><strong>12 x </strong><?php echo 'R$ '.number_format($preco*$taxa12, 2, ',', '.'); ?></span></td>
</tr>
</tbody>
</table>
<font style="font-size:10px">*cobrado 1,99% ao mês no parcelamento via cartão.</font>
</div>
<table cellpadding=0 cellspacing=0 border=0 width="100%">
<tr>
<td>
<center><?php echo $addtocart ?></center>
</td>
</tr>
</table>
</div>
<br style="clear:both">
<div class="vmDetails v3Details">
<h3>Descrição</h3>
<?php echo $product_description ?></div>
<span style="font-style: italic;"><?php echo $file_list ?></span>
<?php if( $this->get_cfg( 'showAvailability' )) {
echo $product_availability;
}?>
</div>
<br style="clear:both">
<? echo $buttons_header ?><br />
<font color="#FF0000" size="-1">
*Fotos meramente ilustrativas<br />
*Mercadoria sob consulta em estoque.</font>
<div class="vmFlyPageBottom v3FlyPageBottom">
<!--
<div class="vmReviews v3Reviews">
<h3>Product Reviews</h3>
<?php echo $product_reviews ?>
<?php echo $product_reviewform ?>
</div>
-->
<br style="clear:both">
<?php echo $product_type ?>
<?php if( $this->get_cfg('showVendorLink')) { ?>
<?php echo $vendor_link ?><br />
<?php } ?>
<?php
if( !empty( $recent_products )) { ?>
<div class="vmRecent v3Recent">
<?php echo $recent_products; ?>
</div>
<?php
}
if( !empty( $navigation_childlist )) { ?>
<? /*
<div class="vmNavList v3NavList">
<h3>
<?php echo $VM_LANG->_('PHPSHOP_MORE_CATEGORIES') ?></h3>
<?php echo $navigation_childlist ?></div>
*/?>
<?php } ?>
</div>
|