コード例 #1
0
ファイル: shopajax.php プロジェクト: JexyRu/Ksenmart
    function get_order_shippings()
    {
        $db = JFactory::getDBO();
        $region_id = JRequest::getVar('region_id', 0);
        $selected = JRequest::getVar('selected', 0);
        $query = "select s.*,(select name from #__ksenmart_shipping_types where id=s.type) as type_name from #__ksenmart_shippings as s where s.regions like '%|{$region_id}|%'";
        $db->setQuery($query);
        $shippings = $db->loadObjectList();
        if (count($shippings) > 0) {
            foreach ($shippings as $ship) {
                $cost = 0;
                $shipping_id = $ship->id;
                $distance = 0;
                include JPATH_ROOT . '/administrator/components/com_ksenmart/helpers/shipping/' . $ship->type_name . '.php';
                ?>
			<div class="shipping">
				<input type="radio" name="shipping_type" regions="<?php 
                echo $ship->regions;
                ?>
" value="<?php 
                echo $ship->id;
                ?>
" <?php 
                echo $ship->id == $selected ? 'checked' : '';
                ?>
/>
				<span class="grey-span"><?php 
                echo JText::_($ship->title);
                echo $cost != 0 ? ' — ' . KSMPrice::showPriceWithoutTransform($cost) : '';
                ?>
</span>
				<span class="shipping-descr">(доставка не позднее <?php 
                echo KSMShipping::getShippingDate($ship->id);
                ?>
)</span>
			</div>			
			<?php 
            }
        } else {
            ?>
		<div class="no_shippings">
			<span class="grey-span">Нет способов доставки для выбранного региона</span>
		</div>
		<?php 
        }
        exit;
    }
コード例 #2
0
ファイル: salesinvoice.php プロジェクト: JexyRu/Ksenmart
	</tr>
	<?php 
    $total_count += $item->count;
    ?>
	<?php 
    $k++;
    ?>
	<?php 
}
?>
	<?php 
if ($this->order->costs['shipping_cost'] != 0) {
    ?>
	<tr>
		<td class="b_left b_top leftAlign">доставка <?php 
    echo KSMShipping::getShippingName($this->order->shipping_id);
    ?>
</td>
		<td class="b_left b_top">796</td>
		<td class="b_left b_top">шт</td>
		<td class="b_left b_top">1</td>
		<td class="b_left b_top rightAlign nobr"><?php 
    echo $this->order->costs['shipping_cost_val'];
    ?>
</td>
		<td class="b_left b_top rightAlign nobr"><?php 
    echo $this->order->costs['shipping_cost_val'];
    ?>
</td>
		<td class="b_left b_top rightAlign">0,00</td>
		<td class="b_left b_top rightAlign">0%</td>