meine basket_b2c:
PHP-Code:
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
/**
* This is the default Basket Template. Modify as you like.
*
* @version $Id: basket_b2c.html.php 617 2007-01-04 19:43:08Z soeren_nb $
* @package VirtueMart
* @subpackage templates
* @copyright Copyright (C) 2004-2005 Soeren Eberhardt. 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.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
?>
<table width="100%" cellspacing="2" cellpadding="4" border="0">
<tr class="sectiontableheader">
<th align="left"><?php echo $VM_LANG->_PHPSHOP_CART_NAME ?></th>
<th align="left"><?php echo $VM_LANG->_PHPSHOP_CART_SKU ?></th>
<th align="right"><?php echo $VM_LANG->_PHPSHOP_CART_PRICE ?></th>
<th align="right"><?php echo $VM_LANG->_PHPSHOP_CART_QUANTITY ?></th>
<th align="right"><?php echo $VM_LANG->_PHPSHOP_CART_SUBTOTAL ?></th>
<th colspan="2" align="right"><?php echo $VM_LANG->_PHPSHOP_CART_ACTION ?></th>
</tr>
<?php foreach( $product_rows as $product ) { ?>
<tr valign="top" class="<?php echo $product['row_color'] ?>">
<td align="left"><?php echo $product['product_name'] . $product['product_attributes'] ?></td>
<td align="left">
<?php
// ---HERSTELLER AUSLESEN---
require_once(CLASSPATH . 'ps_product_files.php' );
require_once(CLASSPATH . 'ps_product.php' );
$ps_product = new ps_product;
require_once(CLASSPATH . 'ps_product_category.php' );
$ps_product_category = new ps_product_category;
require_once(CLASSPATH . 'ps_product_attribute.php' );
$ps_product_attribute = new ps_product_attribute;
require_once(CLASSPATH . 'ps_product_type.php' );
$ps_product_type = new ps_product_type;
require_once(CLASSPATH . 'ps_reviews.php' );
/* Flypage Parameter has old page syntax: shop.flypage
* so let's get the second part - flypage */
$flypage = mosGetParam($_REQUEST, "flypage", FLYPAGE);
$flypage = str_replace( 'shop.', '', $flypage);
$product_id = intval( mosgetparam($_REQUEST, "product_id", null) );
$product_sku = $db->getEscaped( mosgetparam($_REQUEST, "sku", '' ) );
$category_id = mosgetparam($_REQUEST, "category_id", null);
$manufacturer_id = mosgetparam($_REQUEST, "manufacturer_id", null);
$Itemid = $sess->getShopItemid();
$db_product = new ps_DB;
// Get the product info from the database
$q = "SELECT * FROM `#__{vm}_product` WHERE ";
if( !empty($product_id)) {
$q .= "`product_id`=$product_id";
}
elseif( !empty($product_sku )) {
$q .= "`product_sku`='$product_sku'";
}
else {
mosRedirect( $_SERVER['PHP_SELF']."?option=com_virtuemart&keyword={$_SESSION['keyword']}&category_id={$_SESSION['category_id']}&limitstart={$_SESSION['limitstart']}", $VM_LANG->_PHPSHOP_PRODUCT_NOT_FOUND );
}
if( !$perm->check("admin,storeadmin") ) {
$q .= " AND `product_publish`='Y'";
if( CHECK_STOCK && PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS != "1") {
$q .= " AND `product_in_stock` > 0 ";
}
}
$db_product->query( $q );
$manufacturer_name = $ps_product->get_mf_name($product_id);
echo $manufacturer_name;
?>
</td>
<td align="right"><?php echo $product['product_price'] ?></td>
<td align="right">
<form action="<?php echo $action_url ?>" method="post">
<input type="hidden" name="option" value="com_virtuemart" />
<?php echo $product['quantity_box'] ?>
</td>
<td align="right"><?php echo $product['subtotal'] ?></td>
<td width="30px" align="right"><?php echo $product['update_form'] ?></td>
<td width="20px"><?php echo $product['delete_form'] ?></td>
</tr>
<?php } ?>
<!--Begin of SubTotal, Tax, Shipping, Coupon Discount and Total listing -->
<tr class="sectiontableentry2">
<td colspan="4" align="right"><?php echo $VM_LANG->_PHPSHOP_CART_SUBTOTAL ?>:</td>
<td colspan="1" align="right"><?php echo $subtotal_display ?></td>
<td></td><td></td>
</tr>
<?php if( $discount_before ) { ?>
<tr class="sectiontableentry1">
<td colspan="4" align="right"><?php echo $VM_LANG->_PHPSHOP_COUPON_DISCOUNT ?>:
</td>
<td colspan="3" align="right"><?php echo $coupon_display ?></td>
</tr>
<?php }
if( $shipping ) { ?>
<tr class="sectiontableentry1">
<td colspan="4" align="right"><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_SHIPPING ?>: </td>
<td colspan="3"><?php echo $shipping_display ?></td>
</tr>
<?php }
if($discount_after) { ?>
<tr class="sectiontableentry1">
<td colspan="4" align="right"><?php echo $VM_LANG->_PHPSHOP_COUPON_DISCOUNT ?>:
</td>
<td colspan="3"><?php echo $coupon_display ?></td>
</tr>
<?php } ?>
<tr>
<td colspan="3"> </td>
<td colspan="4"><hr style="color:#FFF; background-color:#333; height:1px; border:none;" /></td>
</tr>
<tr>
<td colspan="4" align="right"><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_TOTAL ?>: </td>
<td colspan="1" align="right"><strong><?php echo $order_total_display ?></strong>
<td></td><td></td>
</td>
</tr>
<?php if ( $show_tax ) { ?>
<tr class="sectiontableentry2">
<td colspan="4" align="right" valign="top"><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_TOTAL_TAX ?>: </td>
<td colspan="1" align="right"><?php echo $tax_display ?></td>
<td></td><td></td>
</tr>
<?php } ?>
<tr>
<td colspan="7"><hr style="color:#FFF; background-color:#333; height:1px; border:none;" /></td>
</tr>
</table>
Lesezeichen