Your IP : 216.73.216.50


Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/
Upload File :
Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/cart.tar

tmpl/bs3-default.php000064400000014332152435261230010350 0ustar00<?php
/**
 *
 * Layout for the shopping cart
 *
 * @package    VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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');
if (!empty ($this->cart->products)) {
vmJsApi::vmValidator();
?>

<div id="cart-view" class="cart-view">

	<div class="vm-cart-header-container">
		<div class="vm-continue-shopping pull-right margin-top-15">
			<?php // Continue Shopping Button
			if (!empty($this->continue_link_html)) { ?>
				<a class="continue_link btn btn-default btn-xs" href="<?php echo $this->continue_link; ?>"><?php echo vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING'); ?></a>
			<?php } ?>
		</div>
		<h1 class="page-header"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TITLE'); ?></h1>
		<div class="payments-signin-button"></div>
	<?php if (VmConfig::get ('oncheckout_show_steps', 1) ){
		if($this->checkout_task == 'checkout') {
			echo '<div class="checkoutStep alert alert-info" id="checkoutStep1">' . vmText::_ ('COM_VIRTUEMART_USER_FORM_CART_STEP1') . '</div>';
		} else { //if($this->checkout_task == 'confirm') {
			echo '<div class="checkoutStep alert alert-info" id="checkoutStep4">' . vmText::_ ('COM_VIRTUEMART_USER_FORM_CART_STEP4') . '</div>';
		}
	} ?>
	</div>

	<?php
	$uri = vmUri::getCurrentUrlBy('get');
	$uri = str_replace(array('?tmpl=component','&tmpl=component'),'',$uri);
	echo shopFunctionsF::getLoginForm ($this->cart, FALSE,$uri);

	// This displays the form to change the current shopper
	if ($this->allowChangeShopper and !$this->isPdf){
		echo $this->loadTemplate ('shopperform');
	}

	$taskRoute = '';
	?>

	<form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart' . $taskRoute, $this->useXHTML, $this->useSSL); ?>">
		<?php
		if (!$this->isPdf and VmConfig::get('multixcart')=='byselection') {
			echo shopFunctions::renderVendorFullVendorList($this->cart->vendorId);
			?>
			<input type="submit" name="updatecart" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="btn btn-default"/>
			<?php
		}

		if ( VmConfig::get('oncheckout_opc',true) ) {
			echo $this->loadTemplate ('address');
		 }

		// This displays the pricelist MUST be done with tables, because it is also used for the emails
		echo $this->loadTemplate ('pricelist');

		if ( !VmConfig::get('oncheckout_opc',true) ){
			echo $this->loadTemplate ('address');
		} ?>
		<hr>
		<?php
		if (!empty($this->checkoutAdvertise)) {
		?>
			<div id="checkout-advertise-box" class="clearfix form-group">
			<?php
			foreach ($this->checkoutAdvertise as $checkoutAdvertise) {
			?>
				<div class="checkout-advertise">
					<?php echo $checkoutAdvertise; ?>
				</div>
			<?php
			}
			?>
			</div>
		<?php
		}

		echo $this->loadTemplate ('cartfields');

		?>
		<hr>
		<div class="checkout-button-top text-right">
		<?php
		echo $this->checkout_link_html;
		?>
		</div>
		<?php // Continue and Checkout Button END ?>
		<input type='hidden' name='virtuemart_vendor_id' value='<?php echo $this->cart->vendorId; ?>'/>
		<input type='hidden' name='order_language' value='<?php echo $this->order_language; ?>'/>
		<input type='hidden' name='task' value='updatecart'/>
		<input type='hidden' name='option' value='com_virtuemart'/>
		<input type='hidden' name='view' value='cart'/>
	</form>
<script>
jQuery('#checkoutFormSubmit').addClass('btn btn-success btn-lg btn-block');
jQuery('[data-dynamic-update="1"], .vm-payment-row button, .vm-shipment-row button').click(function(){
	jQuery('div.vm-preloader').removeClass('hidden');
});
</script>

<?php

vmJsApi::addJScript('vm-checkoutFormSubmit',"
	Virtuemart.bCheckoutButton = function(e) {
		e.preventDefault();
		jQuery(this).vm2front('startVmLoading');
		jQuery(this).attr('disabled', 'true');
		jQuery(this).removeClass( 'vm-button-correct' );
		jQuery(this).addClass( 'vm-button' );
		jQuery(this).fadeIn( 400 );
		var name = jQuery(this).attr('name');
		var div = '<input name=\"'+name+'\" value=\"1\" type=\"hidden\">';
		if(name=='confirm'){
		jQuery('#checkoutForm').attr('action','".$this->orderDoneLink."');
		}
		jQuery('#checkoutForm').append(div);
		//Virtuemart.updForm();
		jQuery('#checkoutForm').submit();
	}
	jQuery(document).ready(function($) {
		jQuery(this).vm2front('stopVmLoading');
		var el = jQuery('#checkoutFormSubmit');
		el.unbind('click dblclick');
		el.on('click dblclick',Virtuemart.bCheckoutButton);
	});
");

if( !VmConfig::get('oncheckout_ajax',false)) {
	vmJsApi::addJScript('vm-STisBT',"
		jQuery(document).ready(function($) {

			if ( $('#STsameAsBTjs').is(':checked') ) {
				$('#output-shipto-display').hide();
			} else {
				$('#output-shipto-display').show();
			}
			$('#STsameAsBTjs').click(function(event) {
				if($(this).is(':checked')){
					$('#STsameAsBT').val('1') ;
					$('#output-shipto-display').hide();
				} else {
					$('#STsameAsBT').val('0') ;
					$('#output-shipto-display').show();
				}
				var form = jQuery('#checkoutFormSubmit');
				form.submit();
			});
		});
	");
}

$this->addCheckRequiredJs();
vmJsApi::addJScript( 'vmprices',false,false);
?>
<div style="display:none;" id="cart-js">
<?php echo vmJsApi::writeJS(); ?>
</div>
	<div class="vm-preloader hidden">
		<img src="<?php echo JURI::root(); ?>/components/com_virtuemart/assets/images/vm-preloader.gif" alt="Preloader" />
	</div>
</div>

<?php } else { ?>

<div class="cart-view text-center">
	<h1 class="page-header"><?php echo vmText::_ ('COM_VIRTUEMART_EMPTY_CART'); ?></h1>
	<?php
	// Continue Shopping Button
	if (!empty($this->continue_link_html)) { ?>
		<a class="continue_link btn btn-primary" href="<?php echo $this->continue_link; ?>"><?php echo vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING'); ?></a>
	<?php } ?>
</div>

<?php }tmpl/bs3-default_address.php000064400000010130152435261260012050 0ustar00<?php
/**
*
* Layout for the shopping cart and the mail
* shows the chosen adresses of the shopper
* taken from the cart in the session
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2014 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.
*
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<div class="billto-shipto row">
	<div class="col-md-6">
		<h5 class="page-header">
			<span class="glyphicon glyphicon-home"></span>
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); ?>
		</h5>
		<?php // Output Bill To Address ?>
		<div class="output-billto small">
			<?php
			$cartfieldNames = array();
			foreach( $this->userFieldsCart['fields'] as $fields){
				$cartfieldNames[] = $fields['name'];
			}

			foreach ($this->cart->BTaddress['fields'] as $item) {
				if(in_array($item['name'],$cartfieldNames)) continue;
				if (!empty($item['value'])) {
					if ($item['name'] === 'agreed') {
						$item['value'] = ($item['value'] === 0) ? vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO') : vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
					} ?>
					<span class="values vm2<?php echo '-' . $item['name'] ?>"><?php echo $item['value'] ?></span>
					<?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
					<br class="clear"/>
					<?php
					}
				}
			} ?>
		</div>

		<?php
		if($this->pointAddress){
			$this->pointAddress = 'required invalid';
		}
		?>
		<a class="details btn btn-default btn-xs <?php echo $this->pointAddress ?> margin-top-15" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT', $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); ?>
		</a>

		<input type="hidden" name="billto" value="<?php echo $this->cart->lists['billTo']; ?>"/>
	</div>

	<div class="col-md-6">
		<h5 class="page-header">
			<span class="glyphicon glyphicon-send"></span>
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?>
		</h5>
		<?php // Output Bill To Address ?>
		<div class="output-shipto small">
			<?php
			if($this->cart->user->virtuemart_user_id==0){
				echo vmText::_ ('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
				echo '&nbsp;' . VmHtml::checkbox ('STsameAsBT', $this->cart->STsameAsBT,1,0,'id="STsameAsBTjs" data-dynamic-update=1') . '<br />';
			} else if(!empty($this->cart->lists['shipTo'])){
				echo $this->cart->lists['shipTo'];
			}

			if(empty($this->cart->STsameAsBT) and !empty($this->cart->ST) and !empty($this->cart->STaddress['fields'])){ ?>
				<div id="output-shipto-display">
					<?php
					foreach ($this->cart->STaddress['fields'] as $item) {
					  if($item['name']=='shipto_address_type_name') continue;
						if (!empty($item['value'])) {
							if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') {
								?>
								<span class="values<?php echo '-' . $item['name'] ?>"><?php echo $item['value'] ?></span>
							<?php } else { ?>
								<span class="values"><?php echo $item['value'] ?></span>
								<br class="clear"/>
							<?php
							}
						}
					}
					?>
				</div>
			<?php
			}
			?>
		</div>
		<?php if (!isset($this->cart->lists['current_id'])) {
			$this->cart->lists['current_id'] = 0;
		} ?>
		<a class="details btn btn-default btn-xs margin-top-15" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]=' . $this->cart->lists['current_id'], $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_EDIT_SHIPTO_LBL'); ?>
		</a>
	</div>

</div>tmpl/bs3-default_cartfields.php000064400000002713152435261300012546 0ustar00<?php
/**
 *
 * renders the userfields with "is cart attribute set"
 *
 *
 * @package     VirtueMart
 * @subpackage
 * @author      Max Milbers
 * @link        https://virtuemart.net
 * @copyright   Copyright (c) 2014 - 2018 VirtueMart Team. All rights reserved.
 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @version     $Id: addtocartbtn.php 8024 2014-06-12 15:08:59Z Milbo $
 */
 
defined ('_JEXEC') or die();

// Status Of Delimiter
$closeDelimiter = false;
$openTable = true;
$hiddenFields = '';

if(!empty($this->userFieldsCart['fields'])) {

	// Output: Userfields
	foreach($this->userFieldsCart['fields'] as $field) {
		if ($field['name'] == 'customer_note') {
		$class="well";
		} else {
		$class="";
		}
	?>
	<fieldset class="vm-fieldset-<?php echo str_replace('_','-',$field['name']) . ' ' . $class ?>">
		<div  class="cart <?php echo str_replace('_','-',$field['name']) ?>" title="<?php echo strip_tags($field['description']) ?>">
			<?php
			if ($field['hidden'] == true) {
				// We collect all hidden fields
				// and output them at the end
				$hiddenFields .= $field['formcode'] . "\n";
			} else { ?>
				<label class="cart <?php echo str_replace('_','-',$field['name']) ?> block">
				<?php echo $field['title']; ?>
				<?php echo $field['formcode'] ?>
				</label>
			<?php } ?>
		</div>
	</fieldset>

	<?php
	}
	// Output: Hidden Fields
	echo $hiddenFields;
}
?>
<script>
jQuery('#customer_note_field').addClass('form-control');
</script>tmpl/bs3-default_coupon.php000064400000003112152435261300011723 0ustar00<?php
/**
 *
 * Layout for the edit coupon
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Oscar van Eijk
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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 2458 2010-06-30 18:23:28Z milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

if ($this->layoutName!=$this->cart->layout) {
?>
<form method="post" id="userForm" name="enterCouponCode" action="<?php echo JRoute::_('index.php'); ?>">
<?php } ?>
	<div class="input-group">
		<input type="text" name="coupon_code" size="20" maxlength="50" class="coupon form-control" placeholder="<?php echo $this->coupon_text ?>" value=""/>
		<span class="input-group-btn">
			<input class="btn btn-default" type="submit" name="setcoupon" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>"/>
		</span>
	</div>
<?php
if ($this->layoutName!=$this->cart->layout) {
?>
	<input type="hidden" name="option" value="com_virtuemart" />
	<input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="setcoupon" />
	<input type="hidden" name="controller" value="cart" />
</form>
<?php } ?>tmpl/bs3-default_pricelist.php000064400000041414152435261330012430 0ustar00<fieldset class="vm-fieldset-pricelist margin-top">
	<table class="cart-summary table table-bordered">
		<tr class="vm-head-row">
			<th class="text-left"><?php echo vmText::_ ('COM_VIRTUEMART_CART_NAME') ?></th>
			<th class="text-left vm-cart-hide"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SKU') ?></th>
			<th><?php echo vmText::_ ('COM_VIRTUEMART_CART_PRICE') ?></th>
			<th class="text-center">
			<?php echo vmText::_ ('COM_VIRTUEMART_CART_QUANTITY') ?>
			/ <?php echo vmText::_ ('COM_VIRTUEMART_CART_ACTION') ?>
			</th>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<th class="text-center vm-cart-hide"><span class="priceColor2"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT'); ?></span></th>
			<?php } ?>
			<th class="text-center vm-cart-hide">
				<span class="priceColor2"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_DISCOUNT_AMOUNT'); ?></span>
			</th>
			<th class="text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL') ?></th>
		</tr>

		<?php
		$i = 1;

		foreach ($this->cart->products as $pkey => $prow) { ?>
		<input type="hidden" name="cartpos[]" value="<?php echo $pkey ?>" />
		<tr valign="top" class="sectiontableentry<?php echo $i; if(!empty($prow->class)) echo ' '.$prow->class ?>">
			<td class="text-left">
				<?php if ($prow->virtuemart_media_id) { ?>
				<span class="cart-images">
				<?php
					if (!empty($prow->images[0])) {
						echo $prow->images[0]->displayMediaThumb ('width="60px"', FALSE);
					}
				?>
				</span>
				<?php } ?>
				<?php echo JHtml::link ($prow->url, $prow->product_name); ?>
				<div class="small">
				<?php echo $this->customfieldsModel->CustomsFieldCartDisplay ($prow); ?>
				</div>
			</td>
			<td class="text-left vm-cart-hide"><?php echo $prow->product_sku ?></td>
			<td class="text-right priceCol">
				<?php
				if ($prow->prices['discountAmount'] != -0) {
				?>
				<div class="line-through text-muted"><?php echo $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $prow->prices, TRUE, FALSE); ?></div>
				<?php
				}
				echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $prow->prices, TRUE);
				?>
			</td>
			<td class="text-center">
			<?php
				if ($prow->step_order_level) {
					$step=$prow->step_order_level;
				} else {
					$step=1;
				}
				if ($step==0) {
					$step=1;
				}
			?>
				<input class="form-control" type="text"
				onblur="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
				onclick="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
				onchange="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
				onsubmit="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
				title="<?php echo  vmText::_('COM_VIRTUEMART_CART_UPDATE') ?>" class="quantity-input js-recalculate" size="3" maxlength="4" name="quantity[<?php echo $pkey; ?>]" value="<?php echo $prow->quantity ?>" />

				<div class="margin-top-15">
					<button type="submit" class="vmicon vm2-add_quantity_cart btn btn-primary btn-sm" name="updatecart.<?php echo $pkey ?>" title="<?php echo  vmText::_ ('COM_VIRTUEMART_CART_UPDATE') ?>" data-dynamic-update="1">
						<span class="glyphicon glyphicon-refresh"></span>
					</button>
					<button type="submit" class="vmicon vm2-remove_from_cart btn btn-default btn-sm" name="delete.<?php echo $pkey ?>" title="<?php echo vmText::_ ('COM_VIRTUEMART_CART_DELETE') ?>">
						<span class="glyphicon glyphicon-remove"></span>
					</button>
				</div>
			</td>

			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol vm-cart-hide">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('taxAmount', '', $prow->prices, TRUE, FALSE, $prow->quantity); ?></div>
			</td>
			<?php } ?>
			<td class="text-right priceCol vm-cart-hide">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('discountAmount', '', $prow->prices, TRUE, FALSE, $prow->quantity) ?></div>
			</td>
			<td class="text-right priceCol">
				<?php
				if ($prow->prices['discountAmount'] != -0) { ?>
				<div class="line-through text-muted"><?php echo $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $prow->prices, TRUE, FALSE, $prow->quantity); ?></div>
				<?php }
				echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $prow->prices, TRUE, FALSE, $prow->quantity);
				?>
			</td>
		</tr>
		<!-- End Products -->
		<?php
			$i = ($i==1) ? 2 : 1;
		} ?>
		<!--Begin of SubTotal, Tax, Shipment, Coupon Discount and Total listing -->
		<?php if (VmConfig::get ('show_tax')) {
			$colspan = 3;
		} else {
			$colspan = 2;
		} ?>

		<tr class="sectiontableentry1 vm-pricetotal-row vm-cart-hide">
			<td colspan="4" class="text-right bold"><?php echo vmText::_ ('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_PRICES_TOTAL'); ?></td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('taxAmount', '', $this->cart->cartPrices, TRUE); ?></div>
			</td>
			<?php } ?>
			<td class="text-right priceCol">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('discountAmount', '', $this->cart->cartPrices, TRUE); ?></div>
			</td>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->cartPrices, TRUE) ?></td>
		</tr>

		<?php
		if (VmConfig::get ('coupons_enable')) {
		?>

		<tr class="sectiontableentry2 vm-coupon-row">
			<td colspan="4" class="text-center">
				<div class="col-xs-8">
				<?php if (!empty($this->layoutName) && $this->layoutName == $this->cart->layout) {
					echo $this->loadTemplate ('coupon');
				}	?>
				</div>
				<div class="col-xs-4 text-right">
				<?php if (!empty($this->cart->cartData['couponCode'])) { ?>
					<span class="label label-success">
					<?php
					echo $this->cart->cartData['couponCode'];
					echo $this->cart->cartData['couponDescr'] ? (' (' . $this->cart->cartData['couponDescr'] . ')') : '';
				} ?>
					</span>
				</div>
			</td>
			<?php if (!empty($this->cart->cartData['couponCode'])) { ?>
			<?php if (VmConfig::get ('show_tax')) {	?>
			<td class="text-right priceCol vm-cart-hide"><?php echo $this->currencyDisplay->createPriceDiv ('couponTax', '', $this->cart->cartPrices['couponTax'], TRUE); ?></td>
			<?php } ?>
			<td class="vm-cart-hide"></td>
			<td class="text-right priceCol vm-cart-hide"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceCoupon', '', $this->cart->cartPrices['salesPriceCoupon'], TRUE); ?></td>
			<?php } else { ?>
			<td colspan="<?php if (VmConfig::get ('show_tax')) echo '3'; else echo '2'; ?>" class="vm-cart-hide">&nbsp;</td>
			<?php	} ?>
		</tr>

		<?php }
		foreach ($this->cart->cartData['DBTaxRulesBill'] as $rule) {
		?>

		<tr class="sectiontableentry<?php echo $i ?> vm-cart-hide">
			<td colspan="4" class="text-right"><?php echo vmText::_($rule['calc_name']) ?></td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right"></td>
			<?php } ?>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
		</tr>
			<?php
			if ($i) {
				$i = 1;
			} else {
				$i = 0;
			}
		} ?>

		<?php
		foreach ($this->cart->cartData['taxRulesBill'] as $rule) {
			if($rule['calc_value_mathop']=='avalara') continue;
		?>

		<tr class="sectiontableentry<?php echo $i ?> vm-cart-hide">
			<td colspan="4" class="text-right"><?php echo vmText::_($rule['calc_name']) ?></td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
			<?php } ?>
			<td class="text-right"></td>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
		</tr>
			<?php
			if ($i) {
				$i = 1;
			} else {
				$i = 0;
			}
		}

		foreach ($this->cart->cartData['DATaxRulesBill'] as $rule) { ?>

		<tr class="sectiontableentry<?php echo $i ?> vm-cart-hide">
			<td colspan="4" class="text-right"><?php echo   vmText::_($rule['calc_name']) ?></td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right"></td>
			<?php } ?>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
			<td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
		</tr>
			<?php
			if ($i) {
				$i = 1;
			} else {
				$i = 0;
			}
		} ?>

		<?php
		if ( 	VmConfig::get('oncheckout_opc',true) or
			!VmConfig::get('oncheckout_show_steps',false) or
			(!VmConfig::get('oncheckout_opc',true) and VmConfig::get('oncheckout_show_steps',false) and
				!empty($this->cart->virtuemart_shipmentmethod_id) )
			)
		{ ?>
		<tr class="sectiontableentry1 vm-shipment-row">
			<?php if (!$this->cart->automaticSelectedShipment) { ?>
				<td colspan="4">
					<span class="bold"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SELECTED_SHIPMENT'); ?> :</span>
					<?php
						echo '<span class="label label-success bold">' . $this->cart->cartData['shipmentName'] . '</span>';
						echo '<hr>';
						if (!empty($this->layoutName) and $this->layoutName == $this->cart->layout) {
							if (VmConfig::get('oncheckout_opc', 0)) {
								$previouslayout = $this->setLayoutAndSub('select','shipment');
								echo $this->loadTemplate('shipment');
								$this->setLayout($previouslayout);
							} else {
								echo JHtml::_('link', JRoute::_('index.php?option=com_virtuemart&view=cart&task=edit_shipment', $this->useXHTML, $this->useSSL), '<span class="glyphicon glyphicon-arrow-right"></span> ' . $this->select_shipment_text, 'class="btn btn-primary btn-block btn-xs"');
							}
						} else {
							echo vmText::_ ('COM_VIRTUEMART_CART_SHIPPING');
						}
					?>
				</td>
			<?php } else { ?>
			<td colspan="4">
				<span class="bold"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SELECTED_SHIPMENT'); ?> :</span>
				<?php echo $this->cart->cartData['shipmentName']; ?>
			</td>
			<?php } ?>

			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol vm-cart-hide">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('shipmentTax', '', $this->cart->cartPrices['shipmentTax'], TRUE); ?></div>
			</td>
			<?php } ?>
			<td class="text-right priceCol vm-cart-hide"><?php if($this->cart->cartPrices['salesPriceShipment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], TRUE); ?></td>
			<td class="text-right priceCol vm-cart-hide"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], TRUE); ?></td>
		</tr>

		<?php } ?>

		<?php
		if ($this->cart->pricesUnformatted['salesPrice']>0.0 and
			( 	VmConfig::get('oncheckout_opc',true) or
				!VmConfig::get('oncheckout_show_steps',false) or
				( (!VmConfig::get('oncheckout_opc',true) and VmConfig::get('oncheckout_show_steps',false) ) and !empty($this->cart->virtuemart_paymentmethod_id))
			)
			)
		{ ?>
		<tr class="sectiontableentry1 vm-payment-row">

			<td colspan="4">
				<span class="bold"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SELECTED_PAYMENT'); ?> :</span>

				<?php
				echo '<span class="label label-success bold">' . $this->cart->cartData['paymentName'] . '</span>';
				echo '<hr>';
				if (!empty($this->layoutName) && $this->layoutName == $this->cart->layout) {
					if (VmConfig::get('oncheckout_opc', 0)) {
						$previouslayout = $this->setLayoutAndSub('select','payment');
						echo $this->loadTemplate('payment');
						$this->setLayout($previouslayout);
					} else {
						echo JHtml::_('link', JRoute::_('index.php?option=com_virtuemart&view=cart&task=editpayment', $this->useXHTML, $this->useSSL), '<span class="glyphicon glyphicon-arrow-right"></span> ' .$this->select_payment_text, 'class="btn btn-primary btn-block btn-xs"');
					}
				} else {
				echo vmText::_ ('COM_VIRTUEMART_CART_PAYMENT');
				} ?>
			</td>


			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol vm-cart-hide">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('paymentTax', '', $this->cart->cartPrices['paymentTax'], TRUE); ?></div>
			</td>
			<?php } ?>
			<td class="text-right priceCol vm-cart-hide"><?php if($this->cart->cartPrices['salesPricePayment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->cartPrices['salesPricePayment'], TRUE); ?></td>
			<td class="text-right priceCol vm-cart-hide"><?php echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->cartPrices['salesPricePayment'], TRUE); ?></td>
		</tr>
		<?php  } ?>

		<tr class="sectiontableentry2 vm-carttotal-row vm-cart-hide">
			<td colspan="4" class="text-right"><strong><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL') ?>:</strong></td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right priceCol">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('billTaxAmount', '', $this->cart->cartPrices['billTaxAmount'], TRUE); ?></div>
			</td>
			<?php } ?>
			<td class="text-right priceCol">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('billDiscountAmount', '', $this->cart->cartPrices['billDiscountAmount'], TRUE); ?></div>
			</td>
			<td class="text-right priceCol bold"><?php echo $this->currencyDisplay->createPriceDiv ('billTotal', '', $this->cart->cartPrices['billTotal'], TRUE); ?></td>
		</tr>

		<?php
		if ($this->totalInPaymentCurrency) {
		?>

		<tr class="sectiontableentry2 vm-carttotalpayment-row vm-cart-hide">
			<td colspan="4" class="text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL_PAYMENT') ?>:</td>
			<?php if (VmConfig::get ('show_tax')) { ?>
			<td class="text-right"></td>
			<?php } ?>
			<td class="text-right"></td>
			<td class="text-right priceCol bold"><?php echo $this->totalInPaymentCurrency; ?></td>
		</tr>

		<?php } ?>
	</table>

	<table class="vm-mobile-total table table-striped">
		<!-- COUPON -->
		<tr>
			<td class="vm-mobile-td text-right"><?php echo vmText::_ ('COM_VIRTUEMART_COUPON_DISCOUNT'); ?>:</td>
			<td class="priceCol text-right">
			<?php echo $this->currencyDisplay->createPriceDiv ('salesPriceCoupon', '', $this->cart->cartPrices['salesPriceCoupon'], TRUE); ?>
			</td>
		</tr>
		<!--SHIPMENT-->
		<tr>
			<td class="vm-mobile-td text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SHIPPING'); ?>:</td>
			<td class="priceCol text-right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], TRUE); ?></td>
		</tr>
		<!--PAYMENT-->
		<tr>
			<td class="vm-mobile-td text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_PAYMENT'); ?>:</td>
			<td class="priceCol text-right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->cartPrices['salesPricePayment'], TRUE); ?></td>
		</tr>
		<!--DISCOUNT-->
		<?php if (!empty($this->cart->cartPrices['billDiscountAmount'])) { ?>
		<tr>
			<td class="vm-mobile-td text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_DISCOUNT_AMOUNT'); ?>:</td>
			<td class="priceCol text-right">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('billDiscountAmount', '', $this->cart->cartPrices['billDiscountAmount'], TRUE); ?></div>
			</td>
		</tr>
		<?php } ?>
		<!--TAX-->
		<?php if (VmConfig::get ('show_tax')) { ?>
		<tr>
			<td class="vm-mobile-td text-right"><?php echo vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT'); ?>:</td>
			<td class="priceCol text-right">
				<div class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv ('billTaxAmount', '', $this->cart->cartPrices['billTaxAmount'], TRUE); ?></div>
			</td>
		</tr>
		<?php } ?>
		<!--TOTAL-->
		<tr>
			<td class="vm-mobile-td text-right bold"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL') ?>:</td>
			<td class="priceCol text-right bold"><?php echo $this->currencyDisplay->createPriceDiv ('billTotal', '', $this->cart->cartPrices['billTotal'], TRUE); ?></td>
		</tr>
	</table>
</fieldset>tmpl/bs3-default_shopperform.php000064400000007236152435261360013005 0ustar00<?php
/**
 *
 * Layout for the shopper form to change the current shopper
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Maik K�nnemann
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 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 2458 2013-07-16 18:23:28Z kkmediaproduction $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

vmJsApi::chosenDropDowns();

$currentUser = $this->cart->user->virtuemart_user_id;
?>

<div class="form-group">
	<strong><?php echo vmText::_ ('COM_VIRTUEMART_CART_CHANGE_SHOPPER'); ?></strong>
	<?php if($this->adminID && $currentUser != $this->adminID) { ?>
		<span class="label label-default pull-right"><?php echo vmText::_('COM_VIRTUEMART_CART_ACTIVE_ADMIN') .' '.JFactory::getUser($this->adminID)->name; ?></span>
	<?php } ?>
</div>

<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart'); ?>" method="post">
	<div class="row">
		<div class="col-sm-6">
			<div class="input-group">
				<input class="form-control" type="text" name="usersearch" size="20" maxlength="50">
				<span class="input-group-btn">
					<input class="btn btn-default" type="submit" name="searchShopper" title="<?php echo vmText::_('COM_VIRTUEMART_SEARCH'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SEARCH'); ?>"/>
				</span>
			</div>
		</div>
		<div class="col-sm-6 form-inline">
			<?php
			$currentUser = $this->cart->user->virtuemart_user_id;
			echo JHtml::_('Select.genericlist', $this->userList, 'userID', 'class="vm-chzn-select" style="width: 200px"', 'id', 'displayedName', $currentUser,'userIDcart');
			?>
			<input class="btn btn-primary pull-right" type="submit" name="changeShopper" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_GO'); ?>"/>
		</div>
	</div>
	<?php echo JHtml::_( 'form.token' ); ?>
	<input type="hidden" name="view" value="cart"/>
	<input type="hidden" name="task" value="changeShopper"/>
</form>

<br />

<h5><?php echo vmText::_ ('COM_VIRTUEMART_CART_CHANGE_SHOPPERGROUP'); ?></h5>

<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart'); ?>" method="post" class="inline">
	<table cellspacing="0" cellpadding="0" border="0" style="border:0px !important;">
		<tr style="border:0px;">
			<td style="border:0px;">
				<?php
				if ($this->shopperGroupList) {
					echo $this->shopperGroupList;
				}
				?>
			</td>
			<td style="border:0px;">
				<input type="submit" name="changeShopperGroup" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="button btn btn-primary"  style="margin-left: 10px;"/>
				<input type="hidden" name="view" value="cart"/>
				<input type="hidden" name="task" value="changeShopperGroup"/>
				<?php echo JHtml::_( 'form.token' ); ?>
			</td>
			<?php if (JFactory::getSession()->get('tempShopperGroups', FALSE, 'vm')) { ?>
			<td style="border:0px;">
				<input type="reset" title="<?php echo vmText::_('COM_VIRTUEMART_RESET'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_RESET'); ?>" class="button btn btn-default"  style="margin-left: 10px;"
					onclick="window.location.href='<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart&task=resetShopperGroup'); ?>'"/>
			</td>
			<?php } ?>
		</tr>
	</table>
</form>
<br />tmpl/bs3-order_done.php000064400000002136152435261400011042 0ustar00<?php
defined('_JEXEC') or die('');

/**
*
* Template for the shopping cart
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 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.
*/
echo '<div class="vm-wrap vm-order-done">';
if (vRequest::getBool('display_title',true)) { ?>
	<h1 class="page-header"><?php echo vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU'); ?></h1>
<?php } ?>

<div class="orderdone well">
<?php
echo $this->html;
?>
</div>

<?php
if (vRequest::getBool('display_loginform',true)) {
	$cuser = JFactory::getUser();
	if (!$cuser->guest) echo shopFunctionsF::getLoginForm();
}
?>
<script>
jQuery('a.vm-button-correct').addClass('btn btn-primary');
</script>
<?php echo '</div>'; ?>tmpl/bs3-padded.php000064400000004724152435261400010150 0ustar00<?php
/**
*
* Layout for the add to cart popup
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link http://www.virtuemart.net
* @copyright 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');
?>
<div class="vm-padded">
<?php

if($this->products){
	foreach($this->products as $product){
		if($product->quantity>0){
			echo '<h4 class="page-header">'.vmText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$product->product_name,$product->quantity).'</h4>';
		} else {
			if(!empty($product->errorMsg)){
				echo '<div class="alert alert-danger">'.$product->errorMsg.'</div>';
			}
		}

	}
}


if(VmConfig::get('popup_rel',1)){
	//vmEcho::$echoDebug=true;
	if ($this->products and is_array($this->products) and count($this->products)>0 ) {

		$product = reset($this->products);
		$customFieldsModel = VmModel::getModel('customfields');
		$product->customfields = $customFieldsModel->getCustomEmbeddedProductCustomFields($product->allIds,'R');
		$customFieldsModel->displayProductCustomfieldFE($product,$product->customfields);

		if(!empty($product->customfields)){
		?>
		<div class="well well-sm">
			<h5 class="text-center"><?php echo vmText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h5>
			</div>
			<div class="product-related-products row text-center">
			<?php
			foreach($product->customfields as $rFields){
				if(!empty($rFields->display)){
			?>
				<div class="product-field product-field-type-<?php echo $rFields->field_type ?> col-md-4">
					<div class="product-field-display"><?php echo $rFields->display ?></div>
				</div>
			<?php }
			} ?>
			</div>
			<hr>
	<?php }
	}
}
?>
<div>
		<a class="continue_link btn btn-block btn-default" href="<?php echo $this->continue_link; ?>">
			<?php echo vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING'); ?>
		</a>
		<a class="showcart btn btn-block btn-primary" href="<?php echo $this->cart_link; ?>">
			<span class="glyphicon glyphicon-shopping-cart"></span> <?php echo vmText::_('COM_VIRTUEMART_CART_SHOW'); ?>
		</a>
  </div>
</div>tmpl/bs3-select_payment.php000064400000006236152435261420011745 0ustar00<?php
/**
 *
 * Layout for the payment selection
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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: select_payment.php 8686 2015-02-05 19:43:41Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

$addClass="";

if ($this->layoutName!=$this->cart->layout) { ?>
<h1 class="page-header"><?php echo vmText::_('COM_VIRTUEMART_CART_SELECT_PAYMENT') ?></h1>
<?php }

if (VmConfig::get('oncheckout_show_steps', 1)) { ?>
<div class="checkoutStep alert alert-info" id="checkoutStep3"><?php echo vmText::_('COM_VIRTUEMART_USER_FORM_CART_STEP3'); ?></div>
<?php }

if ($this->layoutName!=$this->cart->layout) {
	$headerLevel = 1;
	if($this->cart->getInCheckOut()){
		$buttonclass = 'button vm-button-correct';
	} else {
		$buttonclass = 'default';
	}
?>

<form method="post" id="paymentForm" name="choosePaymentRate" action="<?php echo JRoute::_('index.php'); ?>" class="form-validate <?php echo $addClass ?>">
<?php
	} else {
		$headerLevel = 3;
		$buttonclass = 'vm-button-correct';
	}
?>

<?php
	if ($this->found_payment_method ) { ?>

	<fieldset class="vm-payment-shipment-select vm-payment-select">
	<?php
		foreach ($this->paymentplugins_payments as $paymentplugin_payments) {

			if (is_array($paymentplugin_payments)) {
				foreach ($paymentplugin_payments as $paymentplugin_payment) { ?>
					<div class="vm-payment-plugin-single"><?php echo $paymentplugin_payment ?></div>
			<?php }
			}

		}
  ?>
	</fieldset>

	<?php
	} else {
	?>

	<h1 class="page-header"><?php echo $this->payment_not_found_text ?></h1>

	<?php
	}

if(VmConfig::get('cart_extraSafeBtn',false) or $this->layoutName!=$this->cart->layout){
?>
<div class="well margin-top-15">
	<?php
	$dynUpdate = '';
	if( VmConfig::get('oncheckout_ajax',false)) {
		$dynUpdate=' data-dynamic-update="1" ';
	} ?>
	<button name="updatecart" class="<?php echo $buttonclass ?> btn btn-primary" type="submit" <?php echo $dynUpdate ?>>
		<span class="glyphicon glyphicon-ok"></span>	<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>
	</button>
	&nbsp;
	<?php if ($this->layoutName!=$this->cart->layout) { ?>
	<button class="<?php echo $buttonclass ?> btn btn-default" type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=cancel'); ?>'" >
		<span class="glyphicon glyphicon-remove"></span>	<?php echo vmText::_('COM_VIRTUEMART_CANCEL'); ?>
	</button>
	<?php } ?>

</div>
<?php
}
if ($this->layoutName!=$this->cart->layout) {
?>
	<input type="hidden" name="option" value="com_virtuemart" />
	<input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="updatecart" />
	<input type="hidden" name="controller" value="cart" />
</form>
<?php
}
?>tmpl/bs3-select_shipment.php000064400000006277152435261460012130 0ustar00<?php
/**
 *
 * Template for the shipment selection
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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 2400 2010-05-11 19:30:47Z milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

if ($this->layoutName!=$this->cart->layout) { ?>
<h1 class="page-header"><?php echo vmText::_('COM_VIRTUEMART_CART_SELECT_SHIPMENT') ?></h1>
<?php }

if (VmConfig::get('oncheckout_show_steps', 1)) { ?>
<div class="checkoutStep alert alert-info" id="checkoutStep2"><?php echo vmText::_('COM_VIRTUEMART_USER_FORM_CART_STEP2'); ?></div>
<?php }

if ($this->layoutName!=$this->cart->layout) {
	$headerLevel = 1;
	if($this->cart->getInCheckOut()){
		$buttonclass = 'button vm-button-correct';
	} else {
		$buttonclass = 'default';
	}
?>

<form method="post" id="shipmentForm" name="chooseShipmentRate" action="<?php echo JRoute::_('index.php'); ?>" class="form-validate">
	<?php
	} else {
		$headerLevel = 3;
		$buttonclass = 'vm-button-correct';
	}
	?>

<?php
	if ($this->found_shipment_method ) { ?>

	<fieldset class="vm-payment-shipment-select vm-shipment-select">
	<?php
	// if only one Shipment , should be checked by default
	foreach ($this->shipments_shipment_rates as $shipment_shipment_rates) {
		if (is_array($shipment_shipment_rates)) {
			foreach ($shipment_shipment_rates as $shipment_shipment_rate) { ?>
			<div class="vm-shipment-plugin-single"><?php echo $shipment_shipment_rate ?></div>
			<?php
			}
		}
	} ?>

	</fieldset>

	<?php
	} else {

	echo "<h".$headerLevel.">".$this->shipment_not_found_text."</h".$headerLevel.">";

	}

	if(VmConfig::get('cart_extraSafeBtn',false) or $this->layoutName!=$this->cart->layout){
	?>
	<div class="well margin-top-15">
		<?php
		$dynUpdate = '';
		if( VmConfig::get('oncheckout_ajax',false)) {
			$dynUpdate=' data-dynamic-update="1" ';
		} ?>
		<button name="updatecart" class="<?php echo $buttonclass ?> btn btn-primary" type="submit" <?php echo $dynUpdate ?>>
			<span class="glyphicon glyphicon-ok"></span>	<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>
		</button>
		&nbsp;
		<?php if ($this->layoutName!=$this->cart->layout) { ?>
		<button class="<?php echo $buttonclass ?> btn btn-default" type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=cancel'); ?>'" >
			<span class="glyphicon glyphicon-remove"></span> <?php echo vmText::_('COM_VIRTUEMART_CANCEL'); ?>
		</button>
		<?php  } ?>
	</div>
<?php
}
if ($this->layoutName!=$this->cart->layout) {
?>
	<input type="hidden" name="option" value="com_virtuemart" />
	<input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="updatecart" />
	<input type="hidden" name="controller" value="cart" />
</form>
<?php
}
?>tmpl/default.php000064400000012135152435261460007667 0ustar00<?php
/**
 *
 * Layout for the shopping cart
 *
 * @package    VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2020 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');

vmJsApi::vmValidator();
//vmdebug('my cart',$this->cart);
?>

<div class="vm-cart-header-container">
	<div class="width50 floatleft vm-cart-header">
		<h1><?php echo vmText::_ ('COM_VIRTUEMART_CART_TITLE'); ?></h1>
		<div class="payments-signin-button" ></div>
	</div>
	<?php if (VmConfig::get ('oncheckout_show_steps', 1) ){
		if($this->checkout_task == 'checkout') {
			echo '<div class="checkoutStep" id="checkoutStep1">' . vmText::_ ('COM_VIRTUEMART_USER_FORM_CART_STEP1') . '</div>';
		} else { //if($this->checkout_task == 'confirm') {
			echo '<div class="checkoutStep" id="checkoutStep4">' . vmText::_ ('COM_VIRTUEMART_USER_FORM_CART_STEP4') . '</div>';
		}
	}  ?>
	<div class="width50 floatleft right vm-continue-shopping">
		<?php // Continue Shopping Button
		if (!empty($this->continue_link_html)) {
			echo $this->continue_link_html;
		} ?>
	</div>
	<div class="clear"></div>
</div>

<div id="cart-view" class="cart-view">


	<?php
	$uri = vmUri::getCurrentUrlBy('get');
	$uri = str_replace(array('?tmpl=component','&tmpl=component'),'',$uri);
	echo shopFunctionsF::getLoginForm ($this->cart, FALSE,$uri);

	// This displays the form to change the current shopper
	if ($this->allowChangeShopper and !$this->isPdf){
		echo $this->loadTemplate ('shopperform');
	}

	$taskRoute = '';
	?><form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart' . $taskRoute, $this->useXHTML, $this->useSSL); ?>">
		<?php
		if(!$this->isPdf and VmConfig::get('multixcart')=='byselection'){
			echo shopFunctions::renderVendorFullVendorList($this->cart->vendorId);
			?><input type="submit" name="updatecart" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="button"  style="margin-left: 10px;"/><?php
		}
		echo $this->loadTemplate ('address');
		// This displays the pricelist MUST be done with tables, because it is also used for the emails
		echo $this->loadTemplate ('pricelist');

		if (!empty($this->checkoutAdvertise)) {
			?> <div id="checkout-advertise-box"> <?php
			foreach ($this->checkoutAdvertise as $checkoutAdvertise) {
				?>
				<div class="checkout-advertise">
					<?php echo $checkoutAdvertise; ?>
				</div>
			<?php
			}
			?></div><?php
		}

		echo $this->loadTemplate ('cartfields');

		?> <div class="checkout-button-top"> <?php
			echo $this->checkout_link_html;
			?></div>

		<?php // Continue and Checkout Button END ?>
        <input type='hidden' name='virtuemart_vendor_id' value='<?php echo $this->cart->vendorId; ?>'/>
		<input type='hidden' name='order_language' value='<?php echo $this->order_language; ?>'/>
		<input type='hidden' name='task' value='updatecart'/>
		<input type='hidden' name='option' value='com_virtuemart'/>
		<input type='hidden' name='view' value='cart'/>
	</form>


<?php





vmJsApi::addJScript('vm-checkoutFormSubmit',"
Virtuemart.bCheckoutButton = function(e) {
	e.preventDefault();
	jQuery(this).vm2front('startVmLoading');
	jQuery(this).attr('disabled', 'true');
	jQuery(this).removeClass( 'vm-button-correct' );
	jQuery(this).addClass( 'vm-button' );
	jQuery(this).fadeIn( 400 );
	var name = jQuery(this).attr('name');
	var div = '<input name=\"'+name+'\" value=\"1\" type=\"hidden\">';
    if(name=='confirm'){
        jQuery('#checkoutForm').attr('action','".$this->orderDoneLink."');
    }
	jQuery('#checkoutForm').append(div);
	//Virtuemart.updForm();
	
	jQuery('#checkoutForm').submit();
}
jQuery(document).ready(function($) {
	jQuery(this).vm2front('stopVmLoading');
	var el = jQuery('#checkoutFormSubmit');
	el.unbind('click dblclick');
	el.on('click dblclick',Virtuemart.bCheckoutButton);
});
	");

if( !VmConfig::get('oncheckout_ajax',false)) {
	vmJsApi::addJScript('vm-STisBT',"
		jQuery(document).ready(function($) {

			if ( $('#STsameAsBTjs').is(':checked') ) {
				$('#output-shipto-display').hide();
			} else {
				$('#output-shipto-display').show();
			}
			$('#STsameAsBTjs').click(function(event) {
				if($(this).is(':checked')){
					$('#STsameAsBT').val('1') ;
					$('#output-shipto-display').hide();
				} else {
					$('#STsameAsBT').val('0') ;
					$('#output-shipto-display').show();
				}
				var form = jQuery('#checkoutFormSubmit');
				form.submit();
			});
		});
	");
}

$this->addCheckRequiredJs();
vmJsApi::addJScript( 'vmprices',false,false);

?><div style="display:none;" id="cart-js">
<?php echo vmJsApi::writeJS(); ?>
</div>
</div>tmpl/default.xml000064400000000553152435261520007676 0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_VIRTUEMART_CART_VIEW_DEFAULT_TITLE">
            <message><![CDATA[COM_VIRTUEMART_CART_VIEW_DEFAULT_DESC]]></message>
	</layout>
	<state>
		<name>COM_VIRTUEMART_CART_VIEW_DEFAULT_TITLE</name>
		<description><![CDATA[COM_VIRTUEMART_CART_VIEW_DEFAULT_DESC]]></description>
	</state>
</metadata>
tmpl/default_address.php000064400000010306152435261520011367 0ustar00<?php
/**
*
* Layout for the shopping cart and the mail
* shows the chosen adresses of the shopper
* taken from the cart in the session
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2014 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.
*
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<div class="billto-shipto">
	<div class="width50 floatleft">

		<span><span class="vmicon vm2-billto-icon"></span>
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); ?></span>
		<?php // Output Bill To Address ?>
		<div class="output-billto">
			<?php
			$cartfieldNames = array();
			foreach( $this->userFieldsCart['fields'] as $fields){
				$cartfieldNames[] = $fields['name'];
			}

			foreach ($this->cart->BTaddress['fields'] as $item) {
				if(in_array($item['name'],$cartfieldNames)) continue;
				if (!empty($item['value'])) {
					if ($item['name'] === 'agreed') {
						$item['value'] = ($item['value'] === 0) ? vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO') : vmText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
					}
					?><!-- span class="titles"><?php echo $item['title'] ?></span -->
			<span class="values vm2<?php echo '-' . $item['name'] ?>"><?php echo $item['value'] ?></span>
			<?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
				<br class="clear"/>
			<?php
			}
			}
			} ?>
			<div class="clear"></div>
		</div>

		<?php
		if($this->pointAddress){
			$this->pointAddress = 'required invalid';
		}

		?>
		<a class="details <?php echo $this->pointAddress ?>" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT', $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); ?>
		</a>

		<input type="hidden" name="billto" value="<?php echo $this->cart->lists['billTo']; ?>"/>
	</div>

	<div class="width50 floatleft">

		<span><span class="vmicon vm2-shipto-icon"></span>
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?></span>
		<?php // Output Bill To Address ?>
		<div class="output-shipto">
			<?php
			if($this->cart->user->virtuemart_user_id==0){

				echo vmText::_ ('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
				echo VmHtml::checkbox ('STsameAsBT', $this->cart->STsameAsBT,1,0,'id="STsameAsBTjs" data-dynamic-update=1') . '<br />';
			} else if(!empty($this->cart->lists['shipTo'])){
				echo $this->cart->lists['shipTo'];
			}

			if(empty($this->cart->STsameAsBT) and !empty($this->cart->ST) and !empty($this->cart->STaddress['fields'])){ ?>
				<div id="output-shipto-display">
					<?php

					foreach ($this->cart->STaddress['fields'] as $item) {

						if($item['name']=='shipto_address_type_name') continue;
						if (!empty($item['value'])) {
							?>
							<!-- <span class="titles"><?php echo $item['title'] ?></span> -->
							<?php
							if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') {
								?>
								<span class="values<?php echo '-' . $item['name'] ?>"><?php echo $item['value'] ?></span>
							<?php } else { ?>
								<span class="values"><?php echo $item['value'] ?></span>
								<br class="clear"/>
							<?php
							}
						}
					}
					?>
				</div>
			<?php
			}
			?>
			<div class="clear"></div>
		</div>
		<?php if (!isset($this->cart->lists['current_id'])) {
			$this->cart->lists['current_id'] = 0;

		} ?>
		<a class="details" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]=' . $this->cart->lists['current_id'], $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
			<?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_EDIT_SHIPTO_LBL'); ?>
		</a>

	</div>

	<div class="clear"></div>
</div>tmpl/default_cartfields.php000064400000002377152435261550012076 0ustar00<?php

/**
 *
 * renders the userfields with "is cart attribute set"
 *
 *
 * @package     VirtueMart
 * @subpackage
 * @author      Max Milbers
 * @link        https://virtuemart.net
 * @copyright   Copyright (c) 2014 - 2018 VirtueMart Team. All rights reserved.
 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @version     $Id: addtocartbtn.php 8024 2014-06-12 15:08:59Z Milbo $
 */

defined ('_JEXEC') or die();

// Status Of Delimiter
$closeDelimiter = false;
$openTable = true;
$hiddenFields = '';

if(!empty($this->userFieldsCart['fields'])) {

	// Output: Userfields
	foreach($this->userFieldsCart['fields'] as $field) {
	?>
	<fieldset class="vm-fieldset-<?php echo str_replace('_','-',$field['name']) ?>">
		<div  class="cart <?php echo str_replace('_','-',$field['name']) ?>" title="<?php echo strip_tags($field['description']) ?>">
		<span class="cart <?php echo str_replace('_','-',$field['name']) ?>" ><?php echo $field['title'] ?></span>

		<?php
		if ($field['hidden'] == true) {
			// We collect all hidden fields
			// and output them at the end
			$hiddenFields .= $field['formcode'] . "\n";
		} else { ?>
				<?php echo $field['formcode'] ?>
			</div>
	<?php } ?>

	</fieldset>

	<?php
	}
	// Output: Hidden Fields
	echo $hiddenFields;
}
?>tmpl/default_coupon.php000064400000003414152435261550011252 0ustar00<?php
/**
 *
 * Layout for the edit coupon
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Oscar van Eijk
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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 2458 2010-06-30 18:23:28Z milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

if ($this->layoutName!=$this->cart->layout) {
?>
<form method="post" id="userForm" name="enterCouponCode" action="<?php echo JRoute::_('index.php'); ?>">
<?php } ?>
    <input type="text" name="coupon_code" size="20" maxlength="50" class="coupon" alt="<?php echo $this->coupon_text ?>" placeholder="<?php echo $this->coupon_text ?>" value="<?php //echo $this->coupon_text; ?>" onblur="if(this.value=='') this.value='<?php echo $this->coupon_text; ?>';" onfocus="if(this.value=='<?php echo $this->coupon_text; ?>') this.value='';" />
    <span class="details-button">
    <input class="details-button" type="submit" name="setcoupon" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>"/>
    </span>
<?php
if ($this->layoutName!=$this->cart->layout) {
?>
    <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="view" value="cart" />
    <input type="hidden" name="task" value="setcoupon" />
    <input type="hidden" name="controller" value="cart" />
</form>
<?php } ?>tmpl/default_pricelist.php000064400000041506152435261560011752 0ustar00<?php
/**
 * Layout for the shopping cart
 *
 * @package    VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2016 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @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');
?>
<fieldset class="vm-fieldset-pricelist">
<table
	class="cart-summary"
	cellspacing="0"
	cellpadding="0"
	border="0"
	width="100%">
<tr>
	<th class="vm-cart-item-name" ><?php echo vmText::_ ('COM_VIRTUEMART_CART_NAME') ?></th>
	<th class="vm-cart-item-sku" ><?php echo vmText::_ ('COM_VIRTUEMART_CART_SKU') ?></th>
	<th	class="vm-cart-item-basicprice" ><?php echo vmText::_ ('COM_VIRTUEMART_CART_PRICE') ?></th>
	<th	class="vm-cart-item-quantity" ><?php echo vmText::_ ('COM_VIRTUEMART_CART_QUANTITY') ?></th>
	<?php if (VmConfig::get ('show_tax')) {
		$tax = vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT');
		if(!empty($this->cart->cartData['VatTax'])){
			if(count($this->cart->cartData['VatTax']) < 2) {
				reset($this->cart->cartData['VatTax']);
				$taxd = current($this->cart->cartData['VatTax']);
				$tax = shopFunctionsF::getTaxNameWithValue(vmText::_($taxd['calc_name']),$taxd['calc_value']);
			}
		}
		?>
	<th class="vm-cart-item-tax" ><?php echo "<span  class='priceColor2'>" . $tax . '</span>' ?></th>
	<?php } ?>
	<th class="vm-cart-item-discount" ><?php echo "<span  class='priceColor2'>" . vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_DISCOUNT_AMOUNT') . '</span>' ?></th>
	<th class="vm-cart-item-total" ><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL') ?></th>
</tr>

<?php
$i = 1;

foreach ($this->cart->products as $pkey => $prow) {
	$prow->prices = array_merge($prow->prices,$this->cart->cartPrices[$pkey]);
?>

<tr style="vertical-align: top" class="sectiontableentry<?php echo $i; if(!empty($prow->class)) echo ' '.$prow->class ?>">
	<td class="vm-cart-item-name" >
		<input type="hidden" name="cartpos[]" value="<?php echo $pkey ?>">
		<?php if ($prow->virtuemart_media_id) { ?>
		<span class="cart-images">
			<?php
			if (!empty($prow->images[0])) {
				echo $prow->images[0]->displayMediaThumb ('', FALSE);
			} ?>
		</span>
		<?php } ?>
		<?php echo JHtml::link ($prow->url, $prow->product_name);
			echo $this->customfieldsModel->CustomsFieldCartDisplay ($prow); ?>
	</td>
	<td class="vm-cart-item-sku" ><?php  echo $prow->product_sku ?></td>
	<td class="vm-cart-item-basicprice" >
		<?php
		if (VmConfig::get ('checkout_show_origprice', 1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['priceWithoutTax']) {
			echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, TRUE, FALSE) . '</span><br />';
		}
		if ($prow->prices['discountedPriceWithoutTax']) {
			echo $this->currencyDisplay->createPriceDiv ('discountedPriceWithoutTax', '', $prow->prices, FALSE, FALSE, 1.0, false, true);
		} else {
			echo $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, FALSE, FALSE, 1.0, false, true);
		} ?>
	</td>
	<td class="vm-cart-item-quantity" ><?php
		if ($prow->step_order_level)
			$step=$prow->step_order_level;
		else
			$step=1;
		if($step==0)
			$step=1;
		?>
		<input type="text"
			onblur="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
			onclick="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
			onchange="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
			onsubmit="Virtuemart.checkQuantity(this,<?php echo $step?>,'<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED',true)?>');"
			title="<?php echo  vmText::_('COM_VIRTUEMART_CART_UPDATE') ?>" class="quantity-input js-recalculate" size="3" maxlength="4" name="quantity[<?php echo $pkey; ?>]" value="<?php echo $prow->quantity ?>" />
        <!--span class="quantity-controls js-recalculate">
				<input type="button" class="quantity-controls quantity-plus"/>
				<input type="button" class="quantity-controls quantity-minus"/>
        </span-->
		<button type="submit" class="vmicon vm2-add_quantity_cart" name="updatecart.<?php echo $pkey ?>" title="<?php echo  vmText::_ ('COM_VIRTUEMART_CART_UPDATE') ?>" data-dynamic-update="1" ></button>
		<button type="submit" class="vmicon vm2-remove_from_cart" name="delete.<?php echo $pkey ?>" title="<?php echo vmText::_ ('COM_VIRTUEMART_CART_DELETE') ?>" ></button>
	</td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td class="vm-cart-item-tax" ><?php echo "<span class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('taxAmount', '', $prow->prices, FALSE, FALSE, $prow->quantity, false, true) . "</span>" ?></td>
	<?php } ?>
	<td class="vm-cart-item-discount" ><?php echo "<span class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('discountAmount', '', $prow->prices, FALSE, FALSE, $prow->quantity, false, true) . "</span>" ?></td>
	<td class="vm-cart-item-total">
		<?php
		if (VmConfig::get ('checkout_show_origprice', 1) && !empty($prow->prices['basePriceWithTax']) && $prow->prices['basePriceWithTax'] != $prow->prices['salesPrice']) {
			echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $prow->prices, TRUE, FALSE, $prow->quantity) . '</span><br />';
		}
		elseif (VmConfig::get ('checkout_show_origprice', 1) && empty($prow->prices['basePriceWithTax']) && !empty($prow->prices['basePriceVariant']) && $prow->prices['basePriceVariant'] != $prow->prices['salesPrice']) {
			echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, TRUE, FALSE, $prow->quantity) . '</span><br />';
		}
		echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $prow->prices, FALSE, FALSE, $prow->quantity) ?></td>
</tr>
	<?php
	$i = ($i==1) ? 2 : 1;
} ?>
<!--Begin of SubTotal, Tax, Shipment, Coupon Discount and Total listing -->
<?php if (VmConfig::get ('show_tax')) {
	$colspan = 3;
} else {
	$colspan = 2;
} ?>
<tr>
	<td colspan="4">&nbsp;</td>
	<td colspan="<?php echo $colspan ?>">
		<hr/>
	</td>
</tr>
<tr class="sectiontableentry1">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_ ('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_PRICES_TOTAL'); ?></td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('taxAmount', '', $this->cart->cartPrices, FALSE, false, true) . "</span>" ?></td>
	<?php } ?>
	<td style="text-align: right;"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('discountAmount', '', $this->cart->cartPrices, FALSE) . "</span>" ?></td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->cartPrices, FALSE) ?></td>
</tr>

<?php


if (VmConfig::get ('coupons_enable')) {
?>
<tr class="sectiontableentry2">
	<td colspan="4" style="text-align: left;">
		<?php if (!empty($this->layoutName) && $this->layoutName == $this->cart->layout) {
		echo $this->loadTemplate ('coupon');
		} ?>
		<?php if (!empty($this->cart->cartData['couponCode'])) { ?>
		<?php
		echo $this->cart->cartData['couponCode'];
		echo $this->cart->cartData['couponDescr'] ? (' (' . $this->cart->cartData['couponDescr'] . ')') : '';
		?>
	</td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ('couponTax', '', $this->cart->cartPrices['couponTax'], FALSE); ?> </td>
	<?php } ?>
	<td style="text-align: right;">&nbsp;</td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceCoupon', '', $this->cart->cartPrices['salesPriceCoupon'], FALSE); ?> </td>
	<?php } else { ?>
	&nbsp;</td>
	<td colspan="<?php echo $colspan ?>" style="text-align: left;">&nbsp;</td>
	<?php }	?>
</tr>
<?php } ?>

<?php
foreach ($this->cart->cartData['DBTaxRulesBill'] as $rule) {
?>
<tr class="sectiontableentry<?php echo $i ?>">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_($rule['calc_name']) ?> </td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"></td>
	<?php } ?>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?>&nbsp;</td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?>&nbsp;</td>
</tr>
	<?php
	if ($i) {
		$i = 1;
	} else {
		$i = 0;
	}
} ?>

<?php

foreach ($this->cart->cartData['taxRulesBill'] as $rule) {
	if($rule['calc_value_mathop']=='avalara') continue;
	?>
<tr class="sectiontableentry<?php echo $i ?>">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_($rule['calc_name']) ?> </td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?>&nbsp;</td>
	<?php } ?>
	<td style="text-align: right;"><?php ?> </td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?>&nbsp;</td>
</tr>
	<?php
	if ($i) {
		$i = 1;
	} else {
		$i = 0;
	}
}

foreach ($this->cart->cartData['DATaxRulesBill'] as $rule) {
	?>
<tr class="sectiontableentry<?php echo $i ?>">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_($rule['calc_name']) ?> </td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;">&nbsp;</td>
	<?php } ?>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
</tr>
	<?php
	if ($i) {
		$i = 1;
	} else {
		$i = 0;
	}
}

if (VmConfig::get('oncheckout_opc',true) or
	!VmConfig::get('oncheckout_show_steps',false) or
	(!VmConfig::get('oncheckout_opc',true) and VmConfig::get('oncheckout_show_steps',false) and
	!empty($this->cart->virtuemart_shipmentmethod_id) )
) { ?>
<tr class="sectiontableentry1" style="vertical-align:top;">
	<?php if (!$this->cart->automaticSelectedShipment) { ?>
	<td colspan="4" style="align:left;vertical-align:top;">
		<?php
		echo '<h3>'.vmText::_ ('COM_VIRTUEMART_CART_SELECTED_SHIPMENT').'</h3>';
		echo $this->cart->cartData['shipmentName'].'<br/>';
		if (!empty($this->layoutName) and $this->layoutName == $this->cart->layout) {
			if (VmConfig::get('oncheckout_opc', 0)) {
				$previouslayout = $this->setLayout('select');
				echo $this->loadTemplate('shipment');
				$this->setLayout($previouslayout);
			} else {
				echo JHtml::_('link', JRoute::_('index.php?option=com_virtuemart&view=cart&task=edit_shipment', $this->useXHTML, $this->useSSL), $this->select_shipment_text, 'class=""');
			}
		} else {
			echo vmText::_ ('COM_VIRTUEMART_CART_SHIPPING');
		}
	echo '</td>';
	} else {
	?>
	<td colspan="4" style="align:left;vertical-align:top;">
		<?php echo '<h4>'.vmText::_ ('COM_VIRTUEMART_CART_SELECTED_SHIPMENT').'</h4>'; ?>
		<?php echo $this->cart->cartData['shipmentName'];
		echo '<span class="floatright">' . $this->currencyDisplay->createPriceDiv ('shipmentValue', '', $this->cart->cartPrices['shipmentValue'], FALSE) . '</span>';
		?>
	</td>
	<?php } ?>

	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"><?php
		echo "<span class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('shipmentTax', '', $this->cart->cartPrices['shipmentTax'], FALSE) . "</span>"; ?> </td>
	<?php } ?>
	<td style="text-align: right;"><?php if($this->cart->cartPrices['salesPriceShipment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], FALSE); ?></td>
	<td style="text-align: right;"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->cartPrices['salesPriceShipment'], FALSE); ?> </td>
</tr>
<?php } ?>
<?php if ($this->cart->pricesUnformatted['salesPrice']>0.0 and
	(VmConfig::get('oncheckout_opc',true) or
		!VmConfig::get('oncheckout_show_steps',false) or
		( (!VmConfig::get('oncheckout_opc',true) and VmConfig::get('oncheckout_show_steps',false) ) and !empty($this->cart->virtuemart_paymentmethod_id))
	)
) { ?>
<tr class="sectiontableentry1" style="vertical-align:top;">

	<td colspan="4" style="align:left;vertical-align:top;">
		<?php
		echo '<h3>'.vmText::_ ('COM_VIRTUEMART_CART_SELECTED_PAYMENT').'</h3>';
		echo $this->cart->cartData['paymentName'].'<br/>';
		if (!empty($this->layoutName) && $this->layoutName == $this->cart->layout) {
			if (VmConfig::get('oncheckout_opc', 0)) {
				$previouslayout = $this->setLayout('select');
				echo $this->loadTemplate('payment');
				$this->setLayout($previouslayout);
			} else {
				echo JHtml::_('link', JRoute::_('index.php?option=com_virtuemart&view=cart&task=editpayment', $this->useXHTML, $this->useSSL), $this->select_payment_text, 'class=""');
			}
		} else {
		echo vmText::_ ('COM_VIRTUEMART_CART_PAYMENT');
		} ?></td>

	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('paymentTax', '', $this->cart->cartPrices['paymentTax'], FALSE) . "</span>"; ?> </td>
	<?php } ?>
	<td style="text-align: right;" ><?php if($this->cart->cartPrices['salesPricePayment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->cartPrices['salesPricePayment'], FALSE); ?></td>
	<td style="text-align: right;" ><?php  echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->cartPrices['salesPricePayment'], FALSE); ?> </td>
</tr>
<?php } ?>

<tr>
	<td colspan="4">&nbsp;</td>
	<td colspan="<?php echo $colspan ?>">
		<hr/>
	</td>
</tr>

<tr class="sectiontableentry2">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL') ?>:</td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;"> <?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('billTaxAmount', '', $this->cart->cartPrices['billTaxAmount'], FALSE) . "</span>" ?> </td>
	<?php } ?>
	<td style="text-align: right;"> <?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('billDiscountAmount', '', $this->cart->cartPrices['billDiscountAmount'], FALSE) . "</span>" ?> </td>
	<td style="text-align: right;"><strong><?php echo $this->currencyDisplay->createPriceDiv ('billTotal', '', $this->cart->cartPrices['billTotal'], FALSE); ?></strong></td>
</tr>

<?php
if ($this->totalInPaymentCurrency) {
?>
<tr class="sectiontableentry2">
	<td colspan="4" style="text-align: right;"><?php echo vmText::_ ('COM_VIRTUEMART_CART_TOTAL_PAYMENT') ?>:</td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td style="text-align: right;">&nbsp;</td>
	<?php } ?>
	<td style="text-align: right;">&nbsp;</td>
	<td style="text-align: right;"><strong><?php echo $this->totalInPaymentCurrency;   ?></strong></td>
</tr>
	<?php
}

//Show VAT tax separated
if(!empty($this->cart->cartData)){
	if(!empty($this->cart->cartData['VatTax'])){
		$c = count($this->cart->cartData['VatTax']);
		if (!VmConfig::get ('show_tax') or $c>1) {
			if($c>0){ ?>

<tr class="sectiontableentry2">
	<td colspan="3">&nbsp;</td>
	<td colspan="2" style="text-align: left;border-bottom: 1px solid #333;"><?php echo vmText::_ ('COM_VIRTUEMART_TOTAL_INCL_TAX') ?></td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td>&nbsp;</td>
	<?php } ?>
	<td>&nbsp;</td>
</tr>
			<?php
			}
			foreach( $this->cart->cartData['VatTax'] as $vatTax ) {
				if(!empty($vatTax['result'])) { ?>
<tr class="sectiontableentry<?php echo $i ?>">
	<td colspan="3">&nbsp;</td>
	<td style="text-align: right;"><?php echo shopFunctionsF::getTaxNameWithValue(vmText::_($vatTax['calc_name']),$vatTax['calc_value']) ?></td>
	<td style="text-align: right;"><span class="priceColor2"><?php echo $this->currencyDisplay->createPriceDiv( 'taxAmount', '', $vatTax['result'], FALSE, false, 1.0,false,true ) ?></span></td>
	<?php if (VmConfig::get ('show_tax')) { ?>
	<td >&nbsp;</td>
	<?php } ?>
	<td>&nbsp;</td>
</tr>
				<?php
				}
			}
		}
	}
}
/*
vmJsApi::addJScript( 'vmprices',false,false);

vmJsApi::vmVariables();
$onReady = 'jQuery(document).ready(function($) {

		Virtuemart.product($(".cart-summary"));
});';
vmJsApi::addJScript('ready.vmprices',$onReady);*/
?>

</table>
</fieldset>
tmpl/default_shopperform.php000064400000007402152435261640012314 0ustar00<?php
/**
 *
 * Layout for the shopper form to change the current shopper
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Maik K�nnemann
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2020 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 2458 2013-07-16 18:23:28Z kkmediaproduction $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

vmJsApi::chosenDropDowns();

?>


<h3><?php echo vmText::_ ('COM_VIRTUEMART_CART_CHANGE_SHOPPER'); ?></h3>

<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart'); ?>" method="post" class="inline">
	<table cellspacing="0" cellpadding="0" border="0" style="border:0px !important;">
		<tr style="border:0px;">
			<td  style="border:0px;">
				<input type="text" name="usersearch" size="20" maxlength="50">
				<input type="submit" name="searchShopper" title="<?php echo vmText::_('COM_VIRTUEMART_SEARCH'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SEARCH'); ?>" class="button"  style="margin-left: 10px;"/>
			</td>
			<td style="border:0px; width: 5%;"></td>
			<td style="border:0px;">
				<?php

				$currentUser = $this->cart->user->virtuemart_user_id;
				echo JHtml::_('Select.genericlist', $this->userList, 'userID', 'class="vm-chzn-select" style="width: 200px"', 'id', 'displayedName', $currentUser,'userIDcart');
				?>
			</td>
			<td style="border:0px;">
				<input type="submit" name="changeShopper" title="<?php echo vmText::_('COM_VIRTUEMART_GO'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_GO'); ?>" class="button"  style="margin-left: 10px;width:100px"/>
				<input type="hidden" name="view" value="cart"/>
				<input type="hidden" name="task" value="changeShopper"/>
			</td>
		</tr>
		<tr style="border:0px;">
			<td colspan="2" style="border:0px;"></td>
			<td colspan="2" style="border:0px;">
				<?php if($this->adminID && $currentUser != $this->adminID) { ?>
					<b><?php echo vmText::_('COM_VIRTUEMART_CART_ACTIVE_ADMIN') .' '.JFactory::getUser($this->adminID)->name; ?></b>
				<?php } ?>
				<?php echo JHtml::_( 'form.token' ); ?>
			</td>
		</tr>
	</table>
</form>
<br />

<h5><?php echo vmText::_ ('COM_VIRTUEMART_CART_CHANGE_SHOPPERGROUP'); ?></h5>

<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart'); ?>" method="post" class="inline">
	<table cellspacing="0" cellpadding="0" border="0" style="border:0px !important;">
		<tr style="border:0px;">
			<td style="border:0px;">
				<?php 
				if ($this->shopperGroupList) {
					echo $this->shopperGroupList;
				}
				?>
			</td>
			<td style="border:0px;">
				<input type="submit" name="changeShopperGroup" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="button"  style="margin-left: 10px;"/>
				<input type="hidden" name="view" value="cart"/>
				<input type="hidden" name="task" value="changeShopperGroup"/>
				<?php echo JHtml::_( 'form.token' ); ?>
			</td>
			<?php if (JFactory::getSession()->get('tempShopperGroups', FALSE, 'vm')) { ?>
			<td style="border:0px;">
				<input type="reset" title="<?php echo vmText::_('COM_VIRTUEMART_RESET'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_RESET'); ?>" class="button"  style="margin-left: 10px;"
					onclick="window.location.href='<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart&task=resetShopperGroup'); ?>'"/>
			</td>
			<?php } ?>
		</tr>
	</table>
</form>
<br />
tmpl/mini_cart.php000064400000001776152435261660010223 0ustar00<?php
/**
*
* Layout for the shopping cart
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 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');

?>
	<a href="<?php echo $this->continue_link; ?>"><?php echo vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') ?></a>
	<a style ="float:right;" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart'); ?>"><?php echo vmText::_('COM_VIRTUEMART_CART_SHOW') ?></a>
<br style="clear:both">
tmpl/order_done.php000064400000002001152435261710010350 0ustar00<?php
defined('_JEXEC') or die('');

/**
*
* Template for the shopping cart
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 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.
*/
echo '<div class="vm-wrap vm-order-done">';

if (vRequest::getBool('display_title',true)) {
	echo '<h3>'.vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU').'</h3>';
}

$this->html = vRequest::get('html', vmText::_('COM_VIRTUEMART_ORDER_PROCESSED') );
echo $this->html;

if (vRequest::getBool('display_loginform',true)) {
	$cuser = JFactory::getUser();
	if (!$cuser->guest) echo shopFunctionsF::getLoginForm();
}
echo '</div>';

tmpl/orderdone.php000064400000001656152435261740010233 0ustar00<?php
defined('_JEXEC') or die('');

/**
*
* Template for the shopping cart
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2018 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.
*/
echo '<div class="vm-wrap vm-order-done">';

if (vRequest::getBool('display_title',true)) {
	echo '<h3>'.vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU').'</h3>';
}

echo $this->html;

if (vRequest::getBool('display_loginform',true)) {
	$cuser = JFactory::getUser();
	if (!$cuser->guest) echo shopFunctionsF::getLoginForm();
}
echo '</div>';

tmpl/orderdone.xml000064400000000563152435261760010242 0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_VIRTUEMART_CART_VIEW_ORDERDONE_TITLE">
            <message><![CDATA[COM_VIRTUEMART_CART_VIEW_ORDERDONE_DESC]]></message>
	</layout>
	<state>
		<name>COM_VIRTUEMART_CART_VIEW_ORDERDONE_TITLE</name>
		<description><![CDATA[COM_VIRTUEMART_CART_VIEW_ORDERDONE_DESC]]></description>
	</state>
</metadata>
tmpl/padded.php000064400000005134152435262010007455 0ustar00<?php
/**
*
* Layout for the add to cart popup
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link https://virtuemart.net
* @copyright Copyright (c) 2013 - 2019 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');
if (empty(VmConfig::get('bootstrap', ''))) {
	$vmbtn = "vm-btn";
	$vmbtnpri ="vm-btn-primary";
	$vmbtnsec = "vm-btn-secondary";
} else {
	$vmbtn = "btn";
	$vmbtnpri = "btn-primary";
	$vmbtnsec = "btn-secondary";
}

echo '<a class="' . $vmbtn . ' ' . $vmbtnsec . ' continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="' . $vmbtn . ' ' . $vmbtnpri . ' showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
if ($this->products and is_array($this->products) and count($this->products)>0 ) {
	foreach($this->products as $product){
		if($product->quantity>0){
		    $quantity = isset($product->quantityAdded)? $product->quantityAdded: $product->quantity;
			echo '<h4>'.vmText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$product->product_name,$quantity).'</h4>';
		}
		if(!empty($product->errorMsg)){
			echo '<div>'.$product->errorMsg.'</div>';
		}
	}
}

if(VmConfig::get('popup_rel',1)){
	//vmEcho::$echoDebug=true;
	if ($this->products and is_array($this->products) and count($this->products)>0 ) {
		$product = reset($this->products);
		$customFieldsModel = VmModel::getModel('customfields');
		$product->customfields = $customFieldsModel->getCustomEmbeddedProductCustomFields($product->allIds,'R');
		$customFieldsModel->displayProductCustomfieldFE($product,$product->customfields);
		if(!empty($product->customfields)){ ?>
			<div class="product-related-products">
				<h4><?php echo vmText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h4>
				<?php
				foreach($product->customfields as $rFields){
					if(!empty($rFields->display)){ ?>
						<div class="product-field product-field-type-<?php echo $rFields->field_type ?>">
							<div class="product-field-display"><?php echo $rFields->display ?></div>
						</div>
						<?php
					}
				} ?>
			</div>
		<?php
		}
	}
} ?>
<br style="clear:both">
tmpl/perror.php000064400000001466152435262040007554 0ustar00<?php
/**
*
* Error Layout for the add to cart popup
*
* @package	VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link https://virtuemart.net
* @copyright Copyright (c) 2013 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @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 '<a class="continue" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';

$messageQueue = JFactory::getApplication()->getMessageQueue();
foreach ($messageQueue as $message) {
	echo '<div>'.$message['message'].'</div>';
}

if(!empty($this->product_name)) {
	echo '<br><h4>'.$this->product_name.'</h4>';
}

?>
<br style="clear:both">
tmpl/select_payment.php000064400000006217152435262040011256 0ustar00<?php
/**
 *
 * Layout for the payment selection
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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: select_payment.php 10649 2022-05-05 14:29:44Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
$addClass="";


if (VmConfig::get('oncheckout_show_steps', 1)) {
	echo '<div class="checkoutStep" id="checkoutStep3">' . vmText::_('COM_VIRTUEMART_USER_FORM_CART_STEP3') . '</div>';
}

if ($this->layoutName!=$this->cart->layout) {
	$headerLevel = 1;
	if($this->cart->getInCheckOut()){
		$buttonclass = 'button vm-button-correct';
	} else {
		$buttonclass = 'default';
	}
	?>
	<form method="post" id="paymentForm" name="choosePaymentRate" action="<?php echo JRoute::_('index.php'); ?>" class="form-validate <?php echo $addClass ?>">
<?php } else {
	$headerLevel = 3;
	$buttonclass = 'vm-button-correct';
}

if($this->cart->virtuemart_paymentmethod_id){
	echo '<h'.$headerLevel.' class="vm-payment-header-selected">'.vmText::_('COM_VIRTUEMART_CART_SELECTED_PAYMENT_SELECT').'</h'.$headerLevel.'>';
} else {
	echo '<h'.$headerLevel.' class="vm-payment-header-select">'.vmText::_('COM_VIRTUEMART_CART_SELECT_PAYMENT').'</h'.$headerLevel.'>';
}

if(VmConfig::get('cart_extraSafeBtn',false) or $this->layoutName!=$this->cart->layout){
	?>

    <div class="buttonBar-right">
		<?php
		$dynUpdate = '';
		if( VmConfig::get('oncheckout_ajax',false)) {
			$dynUpdate=' data-dynamic-update="1" ';
		} ?>
        <button name="updatecart" class="<?php echo $buttonclass ?>" type="submit" <?php echo $dynUpdate ?> ><?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?></button>

		<?php   if ($this->layoutName!=$this->cart->layout) { ?>
            <button class="<?php echo $buttonclass ?>" type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=cancel'); ?>'" ><?php echo vmText::_('COM_VIRTUEMART_CANCEL'); ?></button>
		<?php  } ?>
    </div>

	<?php
}

if ($this->found_payment_method ) {


	echo '<fieldset class="vm-payment-shipment-select vm-payment-select">';
	foreach ($this->paymentplugins_payments as $paymentplugin_payments) {
		if (is_array($paymentplugin_payments)) {
			foreach ($paymentplugin_payments as $paymentplugin_payment) {
				echo '<div class="vm-payment-plugin-single">'.$paymentplugin_payment.'</div>';
			}
		}
	}
	echo '</fieldset>';

} else {
	echo '<h1>'.$this->payment_not_found_text.'</h1>';
}

if ($this->layoutName!=$this->cart->layout) {
	?>    <input type="hidden" name="option" value="com_virtuemart" />
	<input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="updatecart" />
	<input type="hidden" name="controller" value="cart" />
	</form>
<?php
}
?>tmpl/select_shipment.php000064400000006362152435262050011432 0ustar00<?php
/**
 *
 * Template for the shipment selection
 *
 * @package	VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 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 2400 2010-05-11 19:30:47Z milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');


if (VmConfig::get('oncheckout_show_steps', 1)) {
	echo '<div class="checkoutStep" id="checkoutStep2">' . vmText::_('COM_VIRTUEMART_USER_FORM_CART_STEP2') . '</div>';
}

if ($this->layoutName!=$this->cart->layout) {
$headerLevel = 1;
if($this->cart->getInCheckOut()){
	$buttonclass = 'button vm-button-correct';
} else {
	$buttonclass = 'default';
}
?>
<form method="post" id="shipmentForm" name="chooseShipmentRate" action="<?php echo JRoute::_('index.php'); ?>" class="form-validate">
	<?php
	} else {
		$headerLevel = 3;
		$buttonclass = 'vm-button-correct';
	}

	if($this->cart->virtuemart_shipmentmethod_id){
		echo '<h'.$headerLevel.' class="vm-shipment-header-selected">'.vmText::_('COM_VIRTUEMART_CART_SELECTED_SHIPMENT_SELECT').'</h'.$headerLevel.'>';
	} else {
		echo '<h'.$headerLevel.' class="vm-shipment-header-select">'.vmText::_('COM_VIRTUEMART_CART_SELECT_SHIPMENT').'</h'.$headerLevel.'>';
	}

    if(VmConfig::get('cart_extraSafeBtn',false) or $this->layoutName!=$this->cart->layout){
		?>
        <div class="buttonBar-right">
			<?php $dynUpdate = '';
			if( VmConfig::get('oncheckout_ajax',false)) {
				$dynUpdate=' data-dynamic-update="1" ';
			} ?>
            <button name="updatecart" class="<?php echo $buttonclass ?>" type="submit" <?php echo $dynUpdate ?> ><?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?></button>

			<?php   if ($this->layoutName!=$this->cart->layout) { ?>
                <button class="<?php echo $buttonclass ?>" type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=cancel'); ?>'" ><?php echo vmText::_('COM_VIRTUEMART_CANCEL'); ?></button>
			<?php  } ?>
        </div>
		<?php
    }

	if ($this->found_shipment_method ) {

		echo '<fieldset class="vm-payment-shipment-select vm-shipment-select">';
		// if only one Shipment , should be checked by default
		foreach ($this->shipments_shipment_rates as $shipment_shipment_rates) {
			if (is_array($shipment_shipment_rates)) {
				foreach ($shipment_shipment_rates as $shipment_shipment_rate) {
					echo '<div class="vm-shipment-plugin-single">'.$shipment_shipment_rate.'</div>';
				}
			}
		}
		echo '</fieldset>';
	} else {
		echo '<h'.$headerLevel.'>'.$this->shipment_not_found_text.'</h'.$headerLevel.'>';
	}


	if ($this->layoutName!=$this->cart->layout) {
	?> <input type="hidden" name="option" value="com_virtuemart" />
	<input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="updatecart" />
	<input type="hidden" name="controller" value="cart" />
</form>
<?php
}
?>

tmpl/error_log000064400000001214152435262110007434 0ustar00[29-Jul-2026 14:37:34 UTC] PHP Fatal error:  Uncaught Error: Class 'vmText' not found in /home/digilove/public_html/components/com_virtuemart/views/cart/tmpl/bs3-default_pricelist.php:4
Stack trace:
#0 {main}
  thrown in /home/digilove/public_html/components/com_virtuemart/views/cart/tmpl/bs3-default_pricelist.php on line 4
[08-Aug-2026 05:51:42 UTC] PHP Fatal error:  Uncaught Error: Class 'vmText' not found in /home/digilove/public_html/components/com_virtuemart/views/cart/tmpl/bs3-default_pricelist.php:4
Stack trace:
#0 {main}
  thrown in /home/digilove/public_html/components/com_virtuemart/views/cart/tmpl/bs3-default_pricelist.php on line 4
view.html.php000064400000052563152435262140007211 0ustar00<?php

/**
 *
 * View for the shopping cart
 *
 * @package	VirtueMart
 * @subpackage
 * @author Max Milbers
 * @author Oscar van Eijk
 * @author RolandD
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2020 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: view.html.php 10900 2023-07-15 17:40:07Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/**
 * View for the shopping cart
 * @package VirtueMart
 * @author Max Milbers
 * @author Patrick Kohl
 */
class VirtueMartViewCart extends VmView {

	var $pointAddress = false;
	/* @deprecated */
	var $display_title = true;
	/* @deprecated */
	var $display_loginform = true;

	var $html = false;

	public function display($tpl = null) {


		$app = JFactory::getApplication();

		$this->prepareContinueLink();
		if (VmConfig::get('use_as_catalog',0)) {
			vmInfo('This is a catalogue, you cannot access the cart');
			$app->redirect($this->continue_link);
		}

		$pathway = $app->getPathway();
		$document = JFactory::getDocument();
		$document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');

		$this->layoutName = $this->getLayout();
		if (!$this->layoutName) $this->layoutName = vRequest::getCmd('cartlayout', 'default');

		$format = vRequest::getCmd('format');

		$this->cart = VirtueMartCart::getCart();//false, array(), NULL, $vendorId);

		$this->cart->prepareVendor();

		if ($this->layoutName == 'select_shipment') {

			$this->cart->prepareCartData();
			$this->lSelectShipment();

			$pathway->addItem(vmText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE));
			$pathway->addItem(vmText::_('COM_VIRTUEMART_CART_SELECTSHIPMENT'));
			$document->setTitle(vmText::_('COM_VIRTUEMART_CART_SELECTSHIPMENT'));
		} else if ($this->layoutName == 'select_payment') {

			$this->cart->prepareCartData();

			$this->lSelectPayment();

			$pathway->addItem(vmText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE));
			$pathway->addItem(vmText::_('COM_VIRTUEMART_CART_SELECTPAYMENT'));
			$document->setTitle(vmText::_('COM_VIRTUEMART_CART_SELECTPAYMENT'));
		} else if ($this->layoutName == 'orderdone' or $this->layoutName == 'order_done') {
			vmLanguage::loadJLang( 'com_virtuemart_shoppers', true );
			$this->lOrderDone();

			$pathway->addItem( vmText::_( 'COM_VIRTUEMART_CART_THANKYOU' ) );
			$document->setTitle( vmText::_( 'COM_VIRTUEMART_CART_THANKYOU' ) );
			$this->cart->layout = VmConfig::get('cartlayout','default');

		} else {
			vmLanguage::loadJLang('com_virtuemart_shoppers', true);

			$this->renderCompleteAddressList();

			$userFieldsModel = VmModel::getModel ('userfields');

			$userFieldsCart = $userFieldsModel->getUserFields(
				'cart'
				, array('captcha' => true, 'delimiters' => true) // Ignore these types
				, array('delimiter_userinfo','user_is_vendor' ,'username','password', 'password2', 'agreed', 'address_type') // Skips
			);

			$this->userFieldsCart = $userFieldsModel->getUserFieldsFilled(
				$userFieldsCart
				,$this->cart->cartfields
			);

			$this->currencyDisplay = CurrencyDisplay::getInstance($this->cart->pricesCurrency);

			$this->customfieldsModel = VmModel::getModel ('Customfields');

			$this->lSelectCoupon();

			$totalInPaymentCurrency = $this->getTotalInPaymentCurrency();

			$this->checkoutAdvertise = $this->cart->getCheckoutAdvertise();

			if ($this->cart->getDataValidated()) {
				if($this->cart->_inConfirm){
					$pathway->addItem(vmText::_('COM_VIRTUEMART_CANCEL_CONFIRM_MNU'));
					$document->setTitle(vmText::_('COM_VIRTUEMART_CANCEL_CONFIRM_MNU'));
					$text = vmText::_('COM_VIRTUEMART_CANCEL_CONFIRM');
					$this->checkout_task = 'cancel';
				} else {
					$pathway->addItem(vmText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU'));
					$document->setTitle(vmText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU'));
					$text = vmText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
					$this->checkout_task = 'confirm';
				}
			} else {
				$pathway->addItem(vmText::_('COM_VIRTUEMART_CART_OVERVIEW'));
				$document->setTitle(vmText::_('COM_VIRTUEMART_CART_OVERVIEW'));
				$text = vmText::_('COM_VIRTUEMART_CHECKOUT_TITLE');
				$this->checkout_task = 'checkout';
			}
			$dynUpdate = '';
			if( VmConfig::get('oncheckout_ajax',false)) {
				$dynUpdate=' data-dynamic-update="1" ';
			}

			$this->checkout_link_html = '<button type="submit" id="checkoutFormSubmit" name="'.$this->checkout_task.'" value="1" class="vm-button-correct" '.$dynUpdate.' ><span>' . $text . '</span> </button>';

            $multixcart = VmConfig::get('multixcart',0);
			$vendorId = '';
            if($multixcart == 'byproduct'){
                $vendorId = '&virtuemart_vendor_id='.$this->cart->vendorId;
            }
            $this->orderDoneLink = JRoute::_('index.php?option=com_virtuemart&view=cart&task=orderdone'.$vendorId);

			$forceMethods=vRequest::getInt('forceMethods',false);
			if (VmConfig::get('oncheckout_opc', 1) or $forceMethods) {

				//JPluginHelper::importPlugin('vmshipment');
				//JPluginHelper::importPlugin('vmpayment');
				//vmdebug('cart view oncheckout_opc ');
				$lSelectShipment=$this->lSelectShipment() ;
				$lSelectPayment=$this->lSelectPayment();
				if(!$lSelectShipment or !$lSelectPayment){
					if (!VmConfig::get('oncheckout_opc', 1)) {
						vmInfo('COM_VIRTUEMART_CART_ENTER_ADDRESS_FIRST');
					}
					$this->pointAddress = true;
				}
			} else {
				$this->checkPaymentMethodsConfigured();
				$this->checkShipmentMethodsConfigured();
			}

			if ($this->cart->virtuemart_shipmentmethod_id) {
				$shippingText =  vmText::_('COM_VIRTUEMART_CART_CHANGE_SHIPPING');
			} else {
				$shippingText = vmText::_('COM_VIRTUEMART_CART_EDIT_SHIPPING');
			}
			$this->assignRef('select_shipment_text', $shippingText);

			if ($this->cart->virtuemart_paymentmethod_id) {
				$paymentText = vmText::_('COM_VIRTUEMART_CART_CHANGE_PAYMENT');
			} else {
				$paymentText = vmText::_('COM_VIRTUEMART_CART_EDIT_PAYMENT');
			}
			$this->assignRef('select_payment_text', $paymentText);

			//$this->cart->prepareAddressFieldsInCart();

			if(empty($this->cart->layout) or $this->cart->layout=='orderdone') $this->cart->layout = VmConfig::get('cartlayout','default');
			$this->layoutName = $this->cart->layout;

			if ($this->cart->layoutPath) {
				$this->addTemplatePath($this->cart->layoutPath);
			}

			if(!empty($this->layoutName) and $this->layoutName!='default'){
				$this->setLayout( strtolower( $this->layoutName ) );
			}
			//set order language
			$lang = vmLanguage::getLanguage();
			$order_language = $lang->getTag();
			$this->assignRef('order_language',$order_language);
		}

		if($this->cart->storeToDB){
			$this->cart->storeCart();
		}

		$this->useSSL = vmURI::useSSL();
		$this->useXHTML = false;

		$this->assignRef('totalInPaymentCurrency', $totalInPaymentCurrency);


		//We set the valid content time to 2 seconds to prevent that the cart shows wrong entries
		$document->setMetaData('expires', '1',true);
		//We never want that the cart is indexed
		$document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');

		if ($this->cart->_inConfirm) vmInfo('COM_VIRTUEMART_IN_CONFIRM');

		$current = JFactory::getUser();
		$this->allowChangeShopper = false;
		$this->adminID = false;
		if(VmConfig::get ('oncheckout_change_shopper')){
			$this->allowChangeShopper = vmAccess::manager('user');
		}

		$this->shopperGroupList = false;
		if($this->allowChangeShopper){
			$this->userList = $this->getUserList();
			$this->shopperGroupList = $this->getShopperGroupList();
		}

		if(VmConfig::get('oncheckout_ajax',false)){
			vmJsApi::jDynUpdate('#cart-view');
		}

		parent::display($tpl);
	}

	private function lSelectCoupon() {

		$this->couponCode = (!empty($this->cart->couponCode) ? $this->cart->couponCode : '');
		$this->coupon_text = $this->cart->couponCode ? vmText::_('COM_VIRTUEMART_COUPON_CODE_CHANGE') : vmText::_('COM_VIRTUEMART_COUPON_CODE_ENTER');
	}

	/**
	* lSelectShipment
	* find al shipment rates available for this cart
	*
	* @author Valerie Isaksen
	*/

	private function lSelectShipment() {

		$this->found_shipment_method = false;
		$this->shipment_not_found_text = vmText::_('COM_VIRTUEMART_CART_NO_SHIPPING_METHOD_PUBLIC');

		$this->shipments_shipment_rates = array();
		if (!$this->checkShipmentMethodsConfigured()) {
			return;
		}

		$selectedShipment = (empty($this->cart->virtuemart_shipmentmethod_id) ? 0 : $this->cart->virtuemart_shipmentmethod_id);

		$d = VmConfig::$_debug;
		if(VmConfig::get('debug_enable_methods',false)){
			VmConfig::$_debug = 1;
		}
		$returnValues = vDispatcher::trigger('plgVmDisplayListFEShipment', array( $this->cart, $selectedShipment, &$this->shipments_shipment_rates));
		VmConfig::$_debug = $d;
		// if no shipment rate defined
		$this->found_shipment_method = count($this->shipments_shipment_rates);

		$ok = true;
		if ($this->found_shipment_method == 0)  {
			$validUserDataBT = $this->cart->validateUserData();

			if ($validUserDataBT===-1) {
				if (VmConfig::get('oncheckout_opc', 1)) {
					vmdebug('lSelectShipment $found_shipment_method === 0 show error');
					$ok = false;
				} else {
					$mainframe = JFactory::getApplication();
					vmWarn('COM_VIRTUEMART_CART_ENTER_ADDRESS_FIRST');
					$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT'));
				}
			}

		}

		return $ok;
	}

	/*
	 * lSelectPayment
	* find al payment available for this cart
	*
	* @author Valerie Isaksen
	*/

	private function lSelectPayment() {

		$this->payment_not_found_text = '';
		$this->payments_payment_rates = array();

		$this->found_payment_method = 0;
		$selectedPayment = empty($this->cart->virtuemart_paymentmethod_id) ? 0 : $this->cart->virtuemart_paymentmethod_id;

		$this->paymentplugins_payments = array();
		if (!$this->checkPaymentMethodsConfigured()) {
			return;
		}

		$d = VmConfig::$_debug;
		if(VmConfig::get('debug_enable_methods',false)){
			VmConfig::$_debug = 1;
		}
		$returnValues = vDispatcher::trigger('plgVmDisplayListFEPayment', array($this->cart, $selectedPayment, &$this->paymentplugins_payments));
		VmConfig::$_debug = $d;

		$this->found_payment_method =count($this->paymentplugins_payments);
		if (!$this->found_payment_method) {
			$link=''; // todo
			$this->payment_not_found_text = vmText::sprintf('COM_VIRTUEMART_CART_NO_PAYMENT_METHOD_PUBLIC', '<a href="'.$link.'" rel="nofollow">'.$link.'</a>');
		}

		$ok = true;
		if ($this->found_payment_method == 0 )  {
			$validUserDataBT = $this->cart->validateUserData();
			if ($validUserDataBT===-1) {
				if (VmConfig::get('oncheckout_opc', 1)) {
					$ok = false;
				} else {
					$mainframe = JFactory::getApplication();
					vmInfo('COM_VIRTUEMART_CART_ENTER_ADDRESS_FIRST');
					$mainframe->redirect( JRoute::_( 'index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT' ) );
				}
			}
		}


		return $ok;
	}

	private function getTotalInPaymentCurrency() {

		if (empty($this->cart->virtuemart_paymentmethod_id)) {
			return null;
		}

		if (!$this->cart->paymentCurrency or ($this->cart->paymentCurrency==$this->cart->pricesCurrency)) {
			return null;
		}

		$paymentCurrency = CurrencyDisplay::getInstance($this->cart->paymentCurrency);
		$totalInPaymentCurrency = $paymentCurrency->priceDisplay( $this->cart->cartPrices['billTotal'],$this->cart->paymentCurrency) ;
		$this->currencyDisplay = CurrencyDisplay::getInstance($this->cart->pricesCurrency);

		return $totalInPaymentCurrency;
	}


	private function lOrderDone() {

		$this->display_title = !isset($this->display_title) ? vRequest::getBool('display_title', true) : $this->display_title;
		$this->display_loginform = !isset($this->display_loginform) ? vRequest::getBool('display_loginform', true) : $this->display_loginform;

		//Show Thank you page or error due payment plugins like paypal express
		//Do not change this. It contains the payment form
		//$this->html = empty($this->html) ? vRequest::get('html', $this->cart->orderdoneHtml) : $this->html;
        //vmdebug('lOrderDone',$this->cart->orderdoneHtml,$this->html);
        if(!empty($this->cart->orderdoneHtml)){
            $this->html = $this->cart->orderdoneHtml;
        } else if($byRequestHtml= vRequest::get('html', false)){
            $this->html = $byRequestHtml;
        }

		//vmdebug('lOrderDone my cart',$this->html);
        if(empty($this->html) or $this->html == vmText::_('COM_VIRTUEMART_ORDER_PROCESSED')){
	        //vmdebug('lOrderDone orderCompleted $cart->virtuemart_order_id ',$this->cart->OrderIdOrderDone);
        	if(!empty($this->cart->OrderIdOrderDone)){

		        $orderM = VmModel::getModel('orders');

		        $order = $orderM->getOrder($this->cart->OrderIdOrderDone);

		        $paymM = VmModel::getModel('paymentmethod');
		        $paym = $paymM->getPayment($this->cart->virtuemart_paymentmethod_id);
		        //$this->_currentMethod = $this->cart->getPluginMethod($this->cart->virtuemart_paymentmethod_id);

		        vmLanguage::loadJLang('com_virtuemart_orders', TRUE);
		        $orderlink='';
		        $tracking = VmConfig::get('ordertracking','guests');
		        if($tracking !='none' and !($tracking =='registered' and empty($order['details']['BT']->virtuemart_user_id) )) {

			        $orderlink = 'index.php?option=com_virtuemart&view=orders&layout=details&order_number=' . $order['details']['BT']->order_number;
			        if ($tracking == 'guestlink' or ($tracking == 'guests' and empty($order['details']['BT']->virtuemart_user_id))) {
				        $orderlink .= '&order_pass=' . $order['details']['BT']->order_pass;
			        }
		        }

		        vmPSPlugin::getPaymentCurrency($paym, $order['details']['BT']->payment_currency_id);
		        $totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total,$paym->payment_currency);



		        $paymentName ='';
		        vDispatcher::importVMPlugins('vmpayment');
		        $returnValues = vDispatcher::trigger('plgVmOnShowOrderFEPayment',array( $order['details']['BT']->virtuemart_order_id, $order['details']['BT']->virtuemart_paymentmethod_id,  &$paymentName));

		        $this->html = shopFunctionsF::renderVmSubLayout('orderaccessinfo',array(
			        'order_number' =>$order['details']['BT']->order_number,
			        'order_pass' =>$order['details']['BT']->order_pass,
			        'payment_name' => $paymentName,
			        'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display'],
			        'orderlink' =>$orderlink,
			        'method' => $paym
		        ));
vmdebug('lOrderDone created $this->html ',$this->html);


	        }
        }
		$this->cart->OrderIdOrderDone = 0;
		$this->cart->orderdoneHtml = '';
		$this->cart->emptyCart();
	}

	private function checkPaymentMethodsConfigured() {

		if ($this->cart->virtuemart_paymentmethod_id) return true;

		//For the selection of the payment method we need the total amount to pay.
		$paymentModel = VmModel::getModel('Paymentmethod');
		$payments = $paymentModel->getPayments(true, false);
		if (empty($payments)) {

			$text = '';
			if(vmAccess::manager() or vmAccess::isSuperVendor()) {
				$link = JURI::root() . 'administrator/index.php?option=com_virtuemart&view=paymentmethod';
				$text = vmText::sprintf('COM_VIRTUEMART_NO_PAYMENT_METHODS_CONFIGURED_LINK', '<a href="' . $link . '" rel="nofollow">' . $link . '</a>');
			}

			vmInfo('COM_VIRTUEMART_NO_PAYMENT_METHODS_CONFIGURED', $text);
			$this->cart->virtuemart_paymentmethod_id = 0;
			return false;
		}
		return true;
	}

	private function checkShipmentMethodsConfigured() {

		if ($this->cart->virtuemart_shipmentmethod_id) return true;

		//For the selection of the shipment method we need the total amount to pay.
		$shipmentModel = VmModel::getModel('Shipmentmethod');
		$shipments = $shipmentModel->getShipments();
		if (empty($shipments)) {

			$text = '';
			$user = JFactory::getUser();
			if(vmAccess::manager() or vmAccess::isSuperVendor()) {
				$uri = vmURI::getURI();
				$link = $uri->root() . 'administrator/index.php?option=com_virtuemart&view=shipmentmethod';
				$text = vmText::sprintf('COM_VIRTUEMART_NO_SHIPPING_METHODS_CONFIGURED_LINK', '<a href="' . $link . '" rel="nofollow">' . $link . '</a>');
			}

			vmInfo('COM_VIRTUEMART_NO_SHIPPING_METHODS_CONFIGURED', $text);

			$tmp = 0;
			$this->assignRef('found_shipment_method', $tmp);
			$this->cart->virtuemart_shipmentmethod_id = 0;
			return false;
		}
		return true;
	}

	/**
	 * Todo, works only for small stores, we need a new solution there with a bit filtering
	 * For example by time, if already shopper, and a simple search
	 * @return object list of users
	 */
	function getUserList() {

		$result = false;

		if($this->allowChangeShopper){
			$this->adminID = vmAccess::getBgManagerId();
			$superVendor = vmAccess::isSuperVendor($this->adminID,'user');
			if($superVendor){
				$uModel = VmModel::getModel('user');
				$result = $uModel->getSwitchUserList($superVendor,$this->adminID);
			}
		}
		if(!$result) $this->allowChangeShopper = false;
		return $result;
	}

	function getShopperGroupList() {

		$result = false;

		if($this->allowChangeShopper){
			$userModel = VmModel::getModel('user');
			$vmUser = $userModel->getCurrentUser();

			$attrs = array();
			$attrs['style']='width: 220px;';

			$result = ShopFunctions::renderShopperGroupList($vmUser->shopper_groups, TRUE, 'virtuemart_shoppergroup_id', 'COM_VIRTUEMART_DRDOWN_AVA2ALL', $attrs);
		}

		return $result;
	}

	function renderCompleteAddressList(){

		$addressList = false;

		if($this->cart->user->virtuemart_user_id){
			$addressList = array();
			$newBT = vmText::_('COM_VIRTUEMART_ACC_BILL_DEF') . '<br/>';
			foreach($this->cart->user->userInfo as $userInfo){
				$address = $userInfo->loadFieldValues(false);
				if($address->address_type=='BT'){
					$address->virtuemart_userinfo_id = 0;
					$address->address_type_name = $newBT;
					array_unshift($addressList,$address);
				} else {
					$address->address_type_name = !empty($address->zip) ? $address->address_type_name . ' - ' . $address->zip : $address->address_type_name . '<br/>';
					$addressList[] = $address;
				}
			}
			if(count($addressList)==0){
				$addressList[0] = new stdClass();
				$addressList[0]->virtuemart_userinfo_id = 0;
				$addressList[0]->address_type_name = $newBT;
			}

			$_selectedAddress = (
			empty($this->cart->selected_shipto)
				? $addressList[0]->virtuemart_userinfo_id // Defaults to 1st BillTo
				: $this->cart->selected_shipto
			);

			//$usermodel = VmModel::getModel('user');
			//$usermodel->setId($this->cart->user->virtuemart_user_id);
			$this->cart->lists['shipTo'] = JHtml::_('select.radiolist', $addressList, 'shipto', null, 'virtuemart_userinfo_id', 'address_type_name', $_selectedAddress);
			//$this->cart->lists['shipTo'] = ShopFunctionsF::generateStAddressList($this,$usermodel, 'ST');
			$this->cart->lists['billTo'] = empty($addressList[0]->virtuemart_userinfo_id)? 0 : $addressList[0]->virtuemart_userinfo_id;
		} else {
			$this->cart->lists['shipTo'] = false;
			$this->cart->lists['billTo'] = false;
		}
	}

	static public function addCheckRequiredJs(){

		$updF = '';
		if( VmConfig::get('oncheckout_ajax',false)) {
			$updF = 'Virtuemart.updFormS(); return;';
		}

		$cart = VirtueMartCart::getCart();
		$requiredRed = '';

		if(VmConfig::get('CartSetRedBorderUnchecked', true) and count($cart->BT)>3 ){
			$requiredRed = 'Virtuemart.setUnCheckedRedBorder();';
		}
		$j='if (typeof Virtuemart === "undefined")
	var Virtuemart = {};
jQuery(function($) {
	Virtuemart.autocheck = function (){
		var count = 0;
    	var hit = 0;
    	$.each($(".required"), function (key, value){
    		count++;
    		if($(this).prop("checked")){
        		hit++;
       		}
    	});
    	var chkOutBtn = $("#checkoutFormSubmit");

    	var form = $("#checkoutForm");
    	form.find(\'input[name="task"]\').val("updateCartNoMethods");
    	
    	console.log("Required count and hit",count, hit,form);
    	if(count==hit){
    		'.$updF.'
			chkOutBtn.html("<span>'.vmText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU').'</span>");
			chkOutBtn.attr("task","confirm");
			form.submit();
		} else {
			
        	chkOutBtn.attr("task","checkout");
        	chkOutBtn.html("<span>'.vmText::_('COM_VIRTUEMART_CHECKOUT_TITLE').'</span>");
        	form.submit();
        }
	},
	Virtuemart.setUnCheckedRedBorder = function(){
        console.log("Check Checkboxex");
        $(".required").not(":checked").each( function (ind) {
            $(this).parent().css("border-color", "red");
            $(this).parent().css("border-style", "solid");
            $(this).parent().css("border-width", "1px");
        });
    };
});
		
		
jQuery(document).ready(function( $ ){
	var chkOutBtn = $("#checkoutFormSubmit");
	var form = $("#checkoutForm");
	console.log("Autocheck on ready");

	$("#checkoutForm").find(":radio, :checkbox").bind("change", Virtuemart.autocheck);
	
	$("input[type=radio][name=virtuemart_paymentmethod_id]").unbind("change", Virtuemart.autocheck);
	$("input[type=radio][name=virtuemart_shipmentmethod_id]").unbind("change", Virtuemart.autocheck);
	
	$(".output-shipto").find("input").unbind("change", Virtuemart.autocheck);
	$(".output-shipto").find(":radio").bind("change", function(){
		chkOutBtn.attr("task","checkout");
		
		'.$updF.'
		form.submit();
	});
		'.$requiredRed.'

});';
		vmJsApi::addJScript('autocheck',$j);
	}
}

//no closing tag
view.json.php000064400000002566152435262270007220 0ustar00<?php

/**
 *
 * View for the shopping cart
 *
 * @package	VirtueMart
 * @subpackage
 * @author Max Milbers
 * @link https://virtuemart.net
 * @copyright 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: view.html.php 6292 2012-07-20 12:27:44Z alatak $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/**
 * View for the shopping cart
 * @package VirtueMart
 * @author Max Milbers
 */
class VirtueMartViewCart extends VmView {

	public function display($tpl = null) {

		$layoutName = $this->getLayout();
		if (!$layoutName) $layoutName = vRequest::getCmd('layout', 'default');
		$this->assignRef('layoutName', $layoutName);

		$this->cart = VirtueMartCart::getCart();

		if (isset($this->products) and is_array($this->products) and count($this->products)>0 ) {
			$this->prepareContinueLink(reset($this->products));
		} else {
			$this->prepareContinueLink();
		}

		VmTemplate::setVmTemplate($this, 0, 0, $layoutName);

		parent::display($tpl);
	}


}

//no closing tag