<?php
/**
*
* Layout for the add to cart popup
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @[USER=262168]Link[/USER] http://www.virtuemart.net
* @[USER=294783]CopyRight[/USER] Copyright (c) 2013 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: cart.php 2551 2010-09-30 18:52:40Z milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
echo '<div><a class="continue" href="' . $this->continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . JText::_('COM_VIRTUEMART_CART_SHOW') . '</a></div>';
if($this->product){
$temp;
foreach($this->product->customfields as $key=>$customf)
if($customf->virtuemart_custom_id==41){
$temp = $customf->custom_value;
}
echo '<div style="float:left;">'.JHTML::image($this->product->images[0]->file_url, $file_alt, 'width="120px"', $imageArgs).'</div>';
echo '<h4>'.JText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$this->product->product_name,$this->product->quantity,$temp,round($this->product->product_width * 100) / 100,round($this->product->product_length * 100) / 100,round($this->product->product_height * 100) / 100).'</h4>';
echo '<pre>';
print_r($this->product->product_price);
echo '</pre>';
echo '<div id="pro421c"></div>';
echo '<div class="price>'.$this->product->product_price.'</div>';
?>
<?php }
if ($this->errorMsg) echo '<div>'.$this->errorMsg.'</div>';
if(VmConfig::get('popup_rel',1)){
if($this->product and !empty($this->product->customfieldsRelatedProducts)){
?>
<div class="product-related-products">
<h4><?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h4>
<?php
foreach ($this->product->customfieldsRelatedProducts as $field) {
if(!empty($field->display)) {
?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
<span class="product-field-display"><?php echo $field->display ?></span>
</div>
<?php }
} ?>
</div>
<?php
}
}
?><br style="clear:both">
<script>
jQuery(document).ready(function ()
{
var proc = jQuery('#customPrice053 option:selected').text();
var proc_replace = proc.replace('не предоставляется +', '');
var replace = proc_replace.replace('руб', '');
var price = jQuery('.price').html();
var sum_proc = parseInt(price) - parseInt(replace);
jQuery('#pro421c').text('Скидка -' + replace + 'руб.');
jQuery('.price').text('Цена - ' + price);
});
</script>