• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ps_product类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ps_product的典型用法代码示例。如果您正苦于以下问题:PHP ps_product类的具体用法?PHP ps_product怎么用?PHP ps_product使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ps_product类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: genHTML

 function genHTML($catid)
 {
     require_once JPATH_BASE . '/components/com_virtuemart/virtuemart_parser.php';
     require_once CLASSPATH . 'ps_product.php';
     $this->loadProduct($catid);
     $ps_product = new ps_product();
     $i = 0;
     foreach ($this->_listPro as $pro) {
         $temp = $ps_product->product_snapshot($pro, $this->show_price, $this->show_addtocart);
         echo "<div class=\"vm_element\">" . $temp . "</div>";
         $i++;
     }
 }
开发者ID:rafarubert,项目名称:megafiltros,代码行数:13,代码来源:application.php


示例2: getProductBySku

 function getProductBySku($sku)
 {
     global $database, $logger;
     $logger->debug(get_class($this) . "::getProductBySku({$sku})");
     $prod = new Product();
     $ps_prod = new ps_product();
     $ps_cat = new ps_product_category();
     $query = "select product_id from #__vm_product where product_sku=" . $sku;
     $database->loadQuery($query);
     $id = $db->loadResult();
     $prod->setOid($id);
     $prod->setName($ps_prod->get_field('product_name'));
     $prod->setFlypage($ps_prod->get_flypage($id));
     $prod->setCategoryId($ps_cat->get_cid($id));
     return $prod;
 }
开发者ID:justinlyon,项目名称:scc,代码行数:16,代码来源:ProductService.php


示例3: mm_showMyFileName

* @copyright Copyright (C) 2004-2009 soeren - 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
*/
mm_showMyFileName(__FILE__);
global $ps_order_status;
require_once CLASSPATH . 'ps_checkout.php';
require_once CLASSPATH . 'ps_userfield.php';
require_once CLASSPATH . 'ps_product.php';
$ps_product = new ps_product();
$registrationfields = ps_userfield::getUserFields('registration', false, '', true, true);
$shippingfields = ps_userfield::getUserFields('shipping', false, '', true, true);
$order_id = vmRequest::getInt('order_id', 0);
if (empty($order_id)) {
    vmRedirect($_SERVER['SCRIPT_NAME'] . '?option=com_virtuemart&page=order.order_list');
}
$dbc = new ps_DB();
$q = "SELECT * FROM #__{vm}_orders WHERE order_id={$order_id} and vendor_id = {$ps_vendor_id}";
$db->query($q);
$db->next_record();
echo "<style type='text/css' media='print'>.vmNoPrint { display: none }</style>";
?>
<br />&nbsp;&nbsp;
<?php 
echo vmCommonHTML::PrintIcon();
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:order.order_printdetails.php


示例4: getItems

		function getItems(&$params) {
				
			global $CURRENCY_DISPLAY, $sess, $mm_action_url, $VM_LANG;
			$db = new ps_DB;
			
			if($rows = $this->getProductSKU( $this->NumberOfProducts, $this->SortMethod, $this->vmcategories, $this->featuredProducts, $this->specific_product_ids, $this->source, $this->catfilter ))
			{
				$ps_product = new ps_product;
				$ps_product_category = new ps_product_category;
				$pro_skus = implode("','", $rows);	
				$limit = $this->NumberOfProducts;
				if($limit>0) {
					$limit = "LIMIT $limit";
				} else {
					$limit = "";
				}
				$q = "SELECT product_id, product_name, product_parent_id, product_thumb_image, product_desc, product_full_image FROM #__{vm}_product AS p WHERE product_sku in ('$pro_skus')";
				switch( $this->SortMethod ) {
					case 'random':
						$q .= "\n ORDER BY RAND() $limit";
						break;
					case 'newest':
						$q .= "\n ORDER BY p.cdate DESC $limit";
						break;
					case 'oldest':
						$q .= "\n ORDER BY p.cdate ASC $limit";
						break;
					default:
						$q .= "\n ORDER BY p.cdate DESC $limit";
						break;
				}
				$db->setQuery( $q );
				$items = $db->loadObjectList(); 
				//var_dump($items);die;
				foreach($items as &$item) {
					$product_id = $item->product_id;

					$cid = $ps_product_category->get_cid( $product_id );

					$product_name = $item->product_name;
					$item->title = $product_name;
					if ($item->product_parent_id) {
						$url = "?page=shop.product_details&category_id=$cid&flypage=".$ps_product->get_flypage($item->product_parent_id);
						$url .= "&product_id=" . $item->product_parent_id;
					} else {
						$url = "?page=shop.product_details&category_id=$cid&flypage=".$ps_product->get_flypage($item->product_id);
						$url .= "&product_id=" . $item->product_id;
					}
					$product_link = $sess->url($mm_action_url. "index.php" . $url);
					$item->link = $product_link;
					$product_thumb_image = $item->product_full_image;
					
					//$img = $this->image_url( $product_thumb_image, "alt=\"".$product_name."\"");
					$item->image = IMAGEPATH.'product/'.$product_thumb_image;
					$item->fulltext = $item->product_desc;
					$item->introtext = $item->product_desc;
																			
					$price_base = $this->get_price($ps_product,  $item->product_id);
					$price_ps = $ps_product->get_price($item->product_id, true);
					if (_SHOW_PRICES == '1' && $this->show_price) {
						// Show price, but without "including X% tax"
						$item->price = $CURRENCY_DISPLAY->getFullValue($price_base[1]);
						
					}
					
					if (USE_AS_CATALOGUE != 1 && $this->show_addtocart
							&& isset($price_ps) && $price_ps['product_price'] // Product must have a price to add it to cart
							/*&& !$ps_product->product_has_attributes($item->product_id, true)  // Parent Products and Products with attributes can't be added to cart this way*/
							) {
						$url = "?page=shop.cart&func=cartAdd&product_id=" .  $item->product_id;
						$addtocart_link = $sess->url($mm_action_url. "index.php" . $url);
						$item->addtocart_link = $addtocart_link;

					}
					
				}

				return $this->update($params, $items);
			} else return array();
	
			
	
		}		
开发者ID:sergy444,项目名称:joomla,代码行数:83,代码来源:Sotvm.php


示例5:

</a>
    </td>
  </tr>
  <tr>
    <td align="left" nowrap ><?php 
echo $product_price;
?>
</td>
  </tr>
  <tr>
    <td ><a href="<?php 
echo $product_flypage;
?>
">
          <?php 
echo ps_product::image_tag($product_thumb_image, 'class="browseProductImage" border="0" title="' . $product_name . '" alt="' . $product_name . '"');
?>
       </a>
    </td>
  </tr>
  <tr>
    <td height="80" valign="top"><?php 
echo $product_s_desc;
?>
<br />
      <a style="font-size: 9px; font-weight: bold;" href="<?php 
echo $product_flypage;
?>
">[<?php 
echo $product_details;
?>
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:31,代码来源:browse_5.php


示例6: product_order_levels

 /**
  * Retrieves the maximum and minimum quantity for the product specified by $product_id
  *
  * @param int $product_id
  * @return array
  */
 function product_order_levels($product_id)
 {
     $min_order = 0;
     $max_order = 0;
     $product_order_levels = ps_product::get_field($product_id, 'product_order_levels');
     $product_parent_id = ps_product::get_field($product_id, 'product_parent_id');
     if ($product_order_levels != ',') {
         $order_levels = $product_order_levels;
         $levels = explode(",", $order_levels);
         $min_order = array_shift($levels);
         $max_order = array_shift($levels);
     } else {
         if ($product_parent_id > 0) {
             //check parent if product_parent_id != 0
             $product_order_levels = ps_product::get_field($product_parent_id, 'product_order_levels');
             $product_parent_id = ps_product::get_field($product_parent_id, 'product_parent_id');
             if ($product_order_levels != ",") {
                 $order_levels = $product_order_levels;
                 $levels = explode(",", $order_levels);
                 $min_order = array_shift($levels);
                 $max_order = array_shift($levels);
             }
         }
     }
     return array($min_order, $max_order);
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:32,代码来源:ps_product.php


示例7: mm_showMyFileName

* @package VirtueMart
* @subpackage html
* @copyright Copyright (C) 2004-2008 soeren - 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
*/
mm_showMyFileName(__FILE__);
// load important class files
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_files.php";
require_once CLASSPATH . "ps_reviews.php";
require_once CLASSPATH . "imageTools.class.php";
require_once CLASSPATH . "PEAR/Table.php";
require_once CLASSPATH . 'ps_product_attribute.php';
$ps_product_attribute = new ps_product_attribute();
$Itemid = $sess->getShopItemid();
$keyword1 = $vmInputFilter->safeSQL(urldecode(vmGet($_REQUEST, 'keyword1', null)));
$keyword2 = $vmInputFilter->safeSQL(urldecode(vmGet($_REQUEST, 'keyword2', null)));
$search_op = $vmInputFilter->safeSQL(vmGet($_REQUEST, 'search_op', null));
$search_limiter = $vmInputFilter->safeSQL(vmGet($_REQUEST, 'search_limiter', null));
if (empty($category_id)) {
    $category_id = $search_category;
开发者ID:albertobraschi,项目名称:Hab,代码行数:31,代码来源:shop.browse.php


示例8: show_quantity_box

 /**
  * Creates the Quantity Input Boxes/Radio Buttons/Lists for Products
  *
  * @param int $product_id The Parent Product ID
  * @param int $prod_id The actual Product ID
  * @param string $child
  * @param string $use_parent
  * @return string
  */
 function show_quantity_box($product_id, $prod_id, $child = false, $use_parent = 'N')
 {
     global $VM_LANG;
     $tpl = vmTemplate::getInstance();
     if ($child == 'Y') {
         //We have a child list so get the current quantity;
         $quantity = 0;
         for ($i = 0; $i < $_SESSION["cart"]["idx"]; $i++) {
             if ($_SESSION['cart'][$i]["product_id"] == $prod_id) {
                 $quantity = $_SESSION['cart'][$i]["quantity"];
             }
         }
     } else {
         $quantity = vmrequest::getInt('quantity', 1);
     }
     // Detremine which style to use
     if ($use_parent == 'Y' && !empty($product_id)) {
         $id = $product_id;
     } else {
         $id = $prod_id;
     }
     //Get style to use
     $product_in_stock = ps_product::get_field($id, 'product_in_stock');
     $quantity_options = ps_product::get_quantity_options($id);
     extract($quantity_options);
     //Start output of quantity
     //Check for incompatabilities and reset to normal
     if (CHECK_STOCK == '1' && !$product_in_stock) {
         $display_type = 'hide';
     }
     if (empty($display_type) || @$display_type == "hide" && $child == 'Y' || @$display_type == "radio" && $child == 'YM' || @$display_type == "radio" && !$child) {
         $display_type = "none";
     }
     unset($quantity_options['display_type']);
     $tpl->set('prod_id', $prod_id);
     $tpl->set('quantity', $quantity);
     $tpl->set('display_type', $display_type);
     $tpl->set('child', $child);
     $tpl->set('quantity_options', $quantity_options);
     //Determine if label to be used
     $html = $tpl->fetch('product_details/includes/quantity_box_general.tpl.php');
     return $html;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:52,代码来源:ps_product_attribute.php


示例9: vmlistAdditionalImages

 /**
  * Builds a list of all additional images
  *
  * @param int $product_id
  * @param array $images
  * @return string
  */
 function vmlistAdditionalImages($product_id, $images, $title = '', $limit = 1000)
 {
     global $sess;
     $html = '';
     $i = 0;
     foreach ($images as $image) {
         $thumbtag = ps_product::image_tag($image->file_name, 'class="browseProductImage"', 1, 'product', $image->file_image_thumb_width, $image->file_image_thumb_height);
         $fulladdress = $sess->url('index2.php?page=shop.view_images&amp;image_id=' . $image->file_id . '&amp;product_id=' . $product_id . '&amp;pop=1');
         if ($this->get_cfg('useLightBoxImages', 1)) {
             $html .= vmCommonHTML::getLightboxImageLink($image->file_url, $thumbtag, $title ? $title : stripslashes(htmlentities($image->file_title, ENT_QUOTES)), 'product' . $product_id);
         } else {
             $html .= vmPopupLink($fulladdress, $thumbtag, 640, 550);
         }
         $html .= ' ';
         if (++$i > $limit) {
             break;
         }
     }
     return $html;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:27,代码来源:theme.php


示例10: delete_record

 /**
  * Deletes one Record.
  */
 function delete_record($record_id, &$d)
 {
     global $db;
     $record_id = intval($record_id);
     if ($this->validate_delete($record_id)) {
         $dbu = new ps_db();
         // 	Get the order items and update the stock level
         // to the number before the order was placed
         $q = "SELECT order_status, product_id, product_quantity FROM #__{vm}_order_item WHERE order_id={$record_id}";
         $db->query($q);
         require_once CLASSPATH . 'ps_product.php';
         // Now update each ordered product
         while ($db->next_record()) {
             if (in_array($db->f('order_status'), array('P', 'X', 'R'))) {
                 continue;
             }
             if (ENABLE_DOWNLOADS == '1' && ps_product::is_downloadable($db->f("product_id")) && VM_DOWNLOADABLE_PRODUCTS_KEEP_STOCKLEVEL == '1') {
                 $q = "UPDATE #__{vm}_product  \n\t\t\t\t\t\t\tSET product_sales=product_sales-" . $db->f("product_quantity") . " \n\t\t\t\t\t\tWHERE product_id=" . $db->f("product_id");
                 $dbu->query($q);
             } else {
                 $q = "UPDATE #__{vm}_product \n\t\t\t\t\t\tSET product_in_stock=product_in_stock+" . $db->f("product_quantity") . ",\n\t\t\t\t\t\t\tproduct_sales=product_sales-" . $db->f("product_quantity") . " \n\t\t\t\t\t\tWHERE product_id=" . $db->f("product_id");
                 $dbu->query($q);
             }
         }
         $q = "DELETE from #__{vm}_orders where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE from #__{vm}_order_item where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE from #__{vm}_order_payment where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE from #__{vm}_product_download where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE from #__{vm}_order_history where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE from #__{vm}_order_user_info where order_id='{$record_id}'";
         $db->query($q);
         $q = "DELETE FROM #__{vm}_shipping_label where order_id={$record_id}";
         $db->query($q);
         return True;
     } else {
         return False;
     }
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:46,代码来源:ps_order.php


示例11: change_product_item_price

 function change_product_item_price()
 {
     require_once CLASSPATH . 'ps_product.php';
     global $VM_LANG, $vmLogger, $mosConfig_offset;
     $ps_product = new ps_product();
     $order_item_id = vmGet($_REQUEST, 'order_item_id');
     $product_item_price_new = trim(vmGet($_REQUEST, 'product_item_price'));
     $product_final_price_new = trim(vmGet($_REQUEST, 'product_final_price'));
     $db = new ps_DB();
     // Added, to read user_info_id
     $q = "SELECT user_info_id, product_id, product_quantity, product_final_price, product_item_price, product_final_price - product_item_price AS item_tax ";
     $q .= "FROM #__{vm}_order_item WHERE order_id = '" . $this->order_id . "' ";
     $q .= "AND order_item_id = '" . addslashes($order_item_id) . "'";
     $db->query($q);
     $db->next_record();
     $product_id = $db->f('product_id');
     $timestamp = time() + $mosConfig_offset * 60 * 60;
     $user_info_id = $db->f('user_info_id');
     $prod_weight = $ps_product->get_weight($product_id);
     $my_taxrate = $ps_product->get_product_taxrate($product_id, $prod_weight, $user_info_id);
     $product_item_price = $db->f('product_item_price');
     $product_final_price = $db->f('product_final_price');
     $quantity = $db->f('product_quantity');
     if (is_numeric($product_item_price_new)) {
         $product_final_price_new = round($product_item_price_new * ($my_taxrate + 1), 2);
     }
     $product_item_price_new = $product_final_price_new / ($my_taxrate + 1);
     $q = "UPDATE #__{vm}_order_item ";
     $q .= "SET product_item_price = " . $product_item_price_new . ", ";
     $q .= "product_final_price = " . $product_final_price_new . ", ";
     $q .= "mdate = " . $timestamp . " ";
     $q .= "WHERE order_item_id = '" . addslashes($order_item_id) . "'";
     $db->query($q);
     $db->next_record();
     $this->recalc_order($this->order_id);
     $this->reload_from_db = 1;
     $vmLogger->info($VM_LANG->_('PHPSHOP_ORDER_PRINT_PRICE') . $VM_LANG->_('PHPSHOP_ORDER_EDIT_SOMETHING_HAS_CHANGED'));
 }
开发者ID:blackstark,项目名称:sumorder,代码行数:38,代码来源:ps_order_change.php


示例12: LISTS_SPECIAL_TASKS

 /** 
  * Handles special task selectors for pages
  * like the product list
  */
 function LISTS_SPECIAL_TASKS($page)
 {
     global $mosConfig_live_site, $VM_LANG, $product_id;
     $bar =& vmToolBar::getInstance('virtuemart');
     switch ($page) {
         case "product.product_list":
             if (empty($_REQUEST['product_parent_id'])) {
                 // add new attribute
                 $alt = $VM_LANG->_('PHPSHOP_ATTRIBUTE_FORM_MNU');
                 $bar->custom('new', "product.product_attribute_form", 'new', $alt);
             }
             // Go to Price list
             $alt = $VM_LANG->_('PHPSHOP_PRICE_LIST_MNU');
             $bar->custom('new', "product.product_price_list", 'new', $alt);
             // add product type
             $alt = $VM_LANG->_('PHPSHOP_PRODUCT_PRODUCT_TYPE_FORM_MNU');
             $bar->custom('new', "product.product_product_type_form", 'new', $alt);
             /*** Adding an item is only pssible, if the product has attributes ***/
             if (ps_product::product_has_attributes($product_id)) {
                 // Add Item
                 $alt = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_NEW_ITEM_LBL');
                 $bar->custom('new', "product.product_child_form", 'new', $alt);
             }
             $bar->divider();
             if (!empty($_REQUEST['category_id'])) {
                 $alt = $VM_LANG->_('VM_PRODUCTS_MOVE_TOOLBAR');
                 $bar->custom('move', 'product.product_move', 'move', $alt);
                 $bar->divider();
             }
             break;
         case "admin.country_list":
             $alt = $VM_LANG->_('PHPSHOP_ADD_STATE');
             $bar->custom('new', "admin.country_state_form", 'new', $alt);
             $alt = $VM_LANG->_('PHPSHOP_LIST_STATES');
             $bar->custom('new', "admin.country_state_list", 'new', $alt);
             $bar->divider();
             break;
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:43,代码来源:toolbar.html.php


示例13:

?>
<div class="vmRecent">
<?php 
echo $recent_products;
?>
</div>
<?php 
// Show Featured Products
if ($this->get_cfg('showFeatured', 1)) {
    /* featuredproducts(random, no_of_products,category_based) no_of_products 0 = all else numeric amount
       edit featuredproduct.tpl.php to edit layout */
    echo $ps_product->featuredProducts(true, 10, false);
}
// Show Latest Products
if ($this->get_cfg('showlatest', 1)) {
    /* latestproducts(random, no_of_products,month_based,category_based) no_of_products 0 = all else numeric amount
       edit latestproduct.tpl.php to edit layout */
    ps_product::latestProducts(true, 10, false, false);
}
?>

<?php 
if (isset($paypalLogo)) {
    ?>
<div class="vmRecent" style="padding: 10px; text-align: center;">
	<?php 
    echo $paypalLogo;
    ?>
</div>
<?php 
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:shopIndex.tpl.php


示例14: get_insurance_value

 function get_insurance_value($pid)
 {
     /* Read current Configuration */
     require_once CLASSPATH . "shipping/" . __CLASS__ . ".cfg.php";
     $db = new ps_DB();
     /* XXX map shopper group 'DUTY' to sgid (shopper group id) */
     $q = "SELECT shopper_group_id FROM #__{vm}_shopper_group ";
     $q .= "WHERE shopper_group_name='" . DHL_INSURANCE_SHOPPER_GROUP . "'";
     $db->query($q);
     if (!$db->next_record()) {
         /* no group was specific for insurnace value, use normal price */
         $ps_product = new ps_product();
         $p_array = $ps_product->get_price($pid);
         $duty_value = $p_array['product_price'];
     } else {
         $sgid = $db->f("shopper_group_id");
         $q = "SELECT product_price FROM #__{vm}_product_price ";
         $q .= "WHERE product_id='" . $pid . "' ";
         $q .= "AND shopper_group_id='" . $sgid . "'";
         $db->query($q);
         if ($db->next_record()) {
             $duty_value = $db->f("product_price");
         } else {
             /* use the default product price */
             $ps_product = new ps_product();
             $p_array = $ps_product->get_price($pid);
             $duty_value = $p_array['product_price'];
         }
     }
     return $duty_value;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:dhl.php


示例15: displayScroller

 /**
  * Display Product Data
  */
 function displayScroller(&$rows)
 {
     global $mosConfig_absolute_path;
     $database = new ps_DB();
     require_once CLASSPATH . "ps_product.php";
     $ps_product = new ps_product();
     $cnt = 0;
     if ($this->ScrollCSSOverride == 'yes') {
         $txt_size = $this->ScrollTextSize . 'px';
         $margin = $this->ScrollMargin . 'px';
         //$height=($height-intval($margin+0));
         //$width=($width-intval($margin+30));
         echo $this->params->get('pretext', "");
         echo " <div style=\"text-align:" . $this->ScrollAlign . ";background-color: " . $this->ScrollBGColor . "; width:" . $this->ScrollWidth . "px;\n                       margin-top: {$margin}; margin-right: {$margin}; margin-bottom: {$margin}; margin-left: {$margin};\" >\n               <marquee behavior=\"" . $this->ScrollBehavior . "\" \n                        direction=\"" . $this->ScrollDirection . "\"  \n                        height=\"" . $this->ScrollHeight . "\"\n                        width=\"" . $this->ScrollWidth . "\"\n                        scrollamount=\"" . $this->ScrollAmount . "\"\n                        scrolldelay=\"" . $this->ScrollDelay . "\"\n                        truespeed=\"true\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\"\n                        style=\"text-align: " . $this->ScrollTextAlign . "; color: " . $this->ScrollTextColor . "; font-weight: " . $this->ScrollTextWeight . "; font-size: {$txt_size};\" >";
     } else {
         echo " <div style=\"width:" . $this->ScrollWidth . "px;text-align:" . $this->ScrollAlign . ";\">\n               <marquee behavior=\"" . $this->ScrollBehavior . "\" \n                        direction=\"" . $this->ScrollDirection . "\"  \n                        height=\"" . $this->ScrollHeight . "\"\n                        width=\"" . $this->ScrollWidth . "\"\n                        scrollamount=\"" . $this->ScrollAmount . "\"\n                        scrolldelay=\"" . $this->ScrollDelay . "\"\n                        truespeed=\"true\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\">";
     }
     $show_product_name = $this->show_product_name == "yes" ? true : false;
     $show_addtocart = $this->show_addtocart == "yes" ? true : false;
     $show_price = $this->show_price == "yes" ? true : false;
     if ($this->ScrollDirection == 'left' || $this->ScrollDirection == 'right') {
         echo '<table border="0"><tr>';
     }
     foreach ($rows as $row) {
         if ($this->ScrollDirection == 'left' || $this->ScrollDirection == 'right') {
             echo '<td style="vertical-align:top;padding: 2px 5px 2px 5px;">';
         }
         $ps_product->show_snapshot($row->product_sku, $show_price, $show_addtocart, $show_product_name);
         if ($this->ScrollDirection == 'left' || $this->ScrollDirection == 'right') {
             echo '</td>';
         } else {
             for ($i = 0; $i < $this->ScrollLineCharTimes; $i++) {
                 echo $this->ScrollLineChar;
             }
         }
     }
     if ($this->ScrollDirection == 'left' || $this->ScrollDirection == 'right') {
         echo '</tr></table>';
     }
     echo "    </marquee>\n            </div>";
 }
开发者ID:dalinhuang,项目名称:joomla-goods-china,代码行数:44,代码来源:mod_productscroller.php


示例16: getCartnvpstr

 function getCartnvpstr(&$order_totals = array())
 {
     global $auth, $VM_LANG;
     $cart = $_SESSION['cart'];
     require_once CLASSPATH . 'ps_product.php';
     $ps_product = new ps_product();
     $ret_str = "";
     $item_total = 0;
     for ($i = 0; $i < $cart["idx"]; $i++) {
         // Product PRICE
         $price = $ps_product->get_adjusted_attribute_price($cart[$i]["product_id"], $cart[$i]["description"]);
         // Convert to product currency if necessary
         $product_price = $GLOBALS['CURRENCY']->convert($price["product_price"], $price["product_currency"]);
         // SUBTOTAL CALCULATION
         $ret_str .= "&L_AMT" . $i . "=" . round($product_price, 2);
         $ret_str .= "&L_QTY" . $i . "=" . $cart[$i]["quantity"];
         $ret_str .= "&L_NAME" . $i . "=" . urlencode($ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_name"));
         $item_total += round($product_price, 2) * $cart[$i]["quantity"];
     }
     if (!empty($order_totals['coupon_discount'])) {
         // Discount is the difference left after order total has been reduced by subtotal, tax, shipping and shipping tax
         $discount = round($order_totals['order_total'], 2) - $item_total - round($order_totals['order_tax'], 2) - $order_totals['order_shipping'] - $order_totals['order_shipping_tax'];
         // add discount as line item
         $ret_str .= "&L_AMT" . $i . "=" . round($discount, 2);
         $ret_str .= "&L_QTY" . $i . "=1";
         $ret_str .= "&L_NAME" . $i . "=" . urlencode($VM_LANG->_('PHPSHOP_COUPON_DISCOUNT'));
         $item_total += $discount;
     }
     $order_totals['item_total'] = round($item_total, 2);
     $ret_str .= "&ITEMAMT=" . round($item_total, 2);
     //die( $ret_str );
     return $ret_str;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:33,代码来源:ps_paypal_api.php


示例17: list_attribute

 function list_attribute($product_id, $fils = true)
 {
     global $VM_LANG, $CURRENCY_DISPLAY;
     $ps_product = new ps_product();
     $db = new ps_DB();
     $db_sku = new ps_DB();
     $db_item = new ps_DB();
     // Get list of children
     if ($fils) {
         $q = "SELECT product_id,product_name FROM #__{vm}_product WHERE product_parent_id='{$product_id}' AND product_publish='Y'";
     } else {
         $q = "SELECT product_parent_id FROM #__{vm}_product WHERE product_id='{$product_id}'";
         $db->setQuery($q);
         $db->query();
         $db->next_record();
         $product_parent_id = $db->f("product_parent_id");
         $q = "SELECT product_id,product_name FROM #__{vm}_product WHERE product_parent_id='{$product_parent_id}' AND product_publish='Y'";
     }
     $db->setQuery($q);
     $db->query();
     if ($db->num_rows() > 0) {
         $display = '<select name="product_id" onChange="this.form.add_product_validate.value=0;this.form.submit();">';
         $display .= '<option value="-1">Choisissez un produit item</option>';
         while ($db->next_record()) {
             $display .= '<option value="' . $db->f("product_id") . '"';
             if ($product_id == $db->f("product_id")) {
                 $display .= ' selected="yes"';
             }
             $display .= '>' . $db->f("product_name");
             // For each child get attribute values by looping through attribute list
             $q = "SELECT product_id, attribute_name FROM #__{vm}_product_attribute_sku ";
             $q .= "WHERE product_id='{$product_id}' ORDER BY attribute_list ASC";
             $db_sku->setQuery($q);
             $db_sku->query();
             while ($db_sku->next_record()) {
                 $q = "SELECT attribute_name, attribute_value, product_id ";
                 $q .= "FROM #__{vm}_product_attribute WHERE ";
                 $q .= "product_id='" . $db->f("product_id") . "' AND ";
                 $q .= "attribute_name='" . $db_sku->f("attribute_name") . "'";
                 $db_item->setQuery($q);
                 $db_item->query();
                 while ($db_item->next_record()) {
                     $display .= ' - ' . $db_item->f("attribute_name") . " ";
                     $display .= "(" . $db_item->f("attribute_value") . ")";
                     if (!$db_sku->is_last_record()) {
                         $display .= '; ';
                     }
                 }
             }
             // Attributes for this item are done.
             // Now get item price
             $price = $ps_product->get_price($db->f("product_id"));
             if ($_SESSION["auth"]["show_price_including_tax"] == 1) {
                 $tax_rate = 1 + $ps_product->get_product_taxrate($db->f("product_id"));
                 $price['product_price'] *= $tax_rate;
             }
             $display .= ' - ' . $CURRENCY_DISPLAY->getFullValue($price["product_price"]);
             $display .= '</option>';
         }
         $display .= '</select>';
     } else {
         $display = "<input type=\"hidden\" name=\"product_id\" value=\"{$product_id}\" />\n";
     }
     return $display;
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:65,代码来源:ps_order_edit.php


示例18:

			<?php 
    echo $featured['product_price'];
    ?>
<br />
            <?php 
    if ($featured["product_thumb"]) {
        ?>
                <a title="<?php 
        echo $featured["product_name"];
        ?>
" href="<?php 
        $sess->purl(URL . "index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=" . $featured["flypage"] . "&amp;product_id=" . $featured["product_id"]);
        ?>
"> 
				<?php 
        echo ps_product::image_tag($featured["product_thumb"], "class=\"browseProductImage\" border=\"0\" alt=\"" . $featured["product_name"] . "\"");
        ?>
</a><br /><br/>
            <?php 
    }
    ?>
            <?php 
    echo $featured['product_s_desc'];
    ?>
<br />
            
            <?php 
    echo $featured['form_addtocart'];
    ?>
	</div>
	<?php 
开发者ID:rafarubert,项目名称:megafiltros,代码行数:31,代码来源:featuredProducts.tpl.php


示例19: while

?>

<table border="0" cellpadding="0" cellspacing="0" width="100%" class="bestseller-container">
<?php

  while ($db->next_record()) {
      if ($i == 0) {
          $sectioncolor = "sectiontableentry2";
          $i += 1;
      }
      else {
          $sectioncolor = "sectiontableentry1";
          $i -= 1;
      } 
      if( !$db->f('category_flypage') ) {
      	$flypage = ps_product::get_flypage( $db->f('product_id'));
      }
      else {
      	$flypage = $db->f('category_flypage');
      }
      $tt_item++;
      $pid = $db->f("product_parent_id") ? $db->f("product_parent_id") : $db->f("product_id");

      ?>
    <tr class="<?php echo $sectioncolor ?>">
      <td width="12%"><?php printf( $tt_item); ?>.</td>
      <td width="85%">
        <a class="bestseller" href="<?php  $sess->purl(URL . "index.php?page=shop.product_details&flypage=$flypage&product_id=" . $pid . "&category_id=" . $db->f("category_id")) ?>">
            <?php $db->p("product_name"); ?>
        </a>
      </td>
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:31,代码来源:mod_virtuemart_topten.php


示例20:

	
	<td align="center" width="<?php 
    echo $cellwidth;
    ?>
%" >
		<br />
         <a title="<?php 
    echo $category["category_name"];
    ?>
" href="<?php 
    $sess->purl(URL . "index.php?option=com_virtuemart&amp;page=shop.browse&amp;category_id=" . $category["category_id"]);
    ?>
"> 
			<?php 
    if ($category["category_thumb_image"]) {
        echo ps_product::image_tag($category["category_thumb_image"], "alt=\"" . $category["category_name"] . "\"", 0, "category");
        echo "<br /><br/>\n";
    }
    echo $category["category_name"];
    echo $category['number_of_products'];
    ?>
		 </a><br/>
	</td>
	
	
	<?php 
    // Do we need to close the current row now?
    if ($iCol == $categories_per_row) {
        // If the number of products per row has been reached
        echo "</tr>\n";
        $iCol = 1;
开发者ID:noikiy,项目名称:owaspbwa,代码行数:30,代码来源:categoryChildlist.tpl.php



注:本文中的ps_product类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pts_arrays类代码示例发布时间:2022-05-23
下一篇:
PHP ps_DB类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap