当前位置: 首页>>代码示例>>PHP>>正文


PHP ps_product::show_snapshot方法代码示例

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


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

示例1: microtime

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <?php 
srand((double) microtime() * 10000000);
if (sizeof($prodlist) < $max_items) {
    $max_items = sizeof($prodlist);
}
if (sizeof($prodlist) > 1) {
    $rand_prods = array_rand($prodlist, $max_items);
} else {
    $rand_prods = rand(4545.3545, $max_items);
}
if ($max_items == 1) {
    ?>
        <tr align="center" class="sectiontableentry1">
			<td><?php 
    $ps_product->show_snapshot($prodlist[$rand_prods], $show_price, $show_addtocart);
    ?>
<br />
			</td>
		</tr><?php 
} else {
    for ($i = 0; $i < $max_items; $i++) {
        $sectioncolor = $i % 2 ? 'sectiontableentry2' : 'sectiontableentry1';
        if ($display_style == "vertical") {
            ?>
			<tr align="center" class="<?php 
            echo $sectioncolor;
            ?>
">
				<td><?php 
            $ps_product->show_snapshot($prodlist[$rand_prods[$i]], $show_price, $show_addtocart);
开发者ID:rafarubert,项目名称:megafiltros,代码行数:31,代码来源:mod_virtuemart_randomprod.php

示例2: 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

示例3: substr

	$i = 0;
	while($db->next_record() ){
		$short_desc = $db->f("product_s_desc");
		$desc = substr($db->f("product_desc"), 0, 50);
		if ($i%2)
		$sectioncolor = "sectiontableentry2";
		else
		$sectioncolor = "sectiontableentry1";

		$width = intval(100 / intval($db->num_rows()));
		if( $display_style == "vertical" ) {
        ?>
			<tr align="center" class="<?php echo $sectioncolor ?>">
				<td>
					<?php 
					$ps_product->show_snapshot($db->f("product_sku"), $show_price, $show_addtocart);
					?>
				</td>
			</tr>
		<?php
		}
		elseif( $display_style== "horizontal" ) {
			if( $i == 0 )
			echo "<tr>\n";
				if ( ($i+1) % $products_per_row == 0) { echo "<td width=\"$width%\" class=\"hLine\">"; } else {echo "<td width=\"$width%\" class=\"vLine hLine\">";}
			$ps_product->show_snapshot($db->f("product_sku"),  $show_price, $show_addtocart );
			echo "</td>\n";
			if( ($i+1) == $db->num_rows() )
			echo "</tr>\n";
		}
		elseif( $display_style== "table" ) {
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:31,代码来源:mod_virtuemart_featureprod.php

示例4: intval

if( $db->num_rows() > 0 ){ ?>
	  <table border="0" cellpadding="0" cellspacing="0" width="100%">        
		<?php
		$i = 0;
		while($db->next_record() ){
			if ($i%2)
				$sectioncolor = "sectiontableentry2";
			else
				$sectioncolor = "sectiontableentry1";
			 
			$width = intval(100 / intval($db->num_rows()));
			if( $display_style == "vertical" ) {
				?>
				<tr align="center" class="<?php echo $sectioncolor ?>">
					<td><?php $ps_product->show_snapshot($db->f("product_sku"), $show_price, $show_addtocart); ?><br /></td>
				</tr>
				<?php
			}
			elseif( $display_style== "horizontal" ) {
				if( $i == 0 )
					echo "<tr>\n";
				if ( ($i+1) % $products_per_row == 0) { echo "<td width=\"$width%\" class=\"hLine\">"; } else {echo "<td width=\"$width%\" class=\"vLine hLine\">";}
				$ps_product->show_snapshot($db->f("product_sku"), $show_price, $show_addtocart);
				echo "</td>\n";
				if( ($i+1) == $max_items )
					echo "</tr>\n";
			}
			elseif( $display_style== "table" ) {
				if( $i == 0 )
					echo "<tr>\n";
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:30,代码来源:mod_virtuemart_latestprod.php


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