Beispiel #1
0
 /**
  * This function is used to show  the category bread crumb
  * 
  * 
  * @return HTML data
  */
 function categoryBreadCrumb()
 {
     return Display_DNewProducts::categoryBreadCrumb();
 }
Beispiel #2
0
    /**
     * This function is used to Display the Featured Product Hidden Desktop
     * @param mixed $arr
     * @param integer $flag
     * @param array $r
     * @return string
     */
    function featuredProductsHidden($arr, $flag, $r)
    {
        $output = '<div class="image_grid portfolio_4col">
		<div id="horz_scroll_id">';
        $output .= '
       		 <div class="row-fluid">';
        if (count($arr) > 0) {
            for ($i = 0; $i < count($arr); $i++) {
                if ($i % 4 == 0) {
                    $output .= ' </div> <div class="row-fluid">';
                }
                if ($arr[$i]['product_status'] == 1) {
                    $imagetag = '<div class="ribbion_new_div"></div>';
                } elseif ($arr[$i]['product_status'] == 2) {
                    $imagetag = '<div class="ribbion_sale_div"></div>';
                } elseif ($arr[$i]['product_status'] == 0) {
                    $imagetag = '';
                }
                if (trim($arr[$i]['has_variation']) == '1') {
                    $get_lowest_price = Display_DNewProducts::getLowestvariationPrice($arr[$i]['product_id']);
                    $msrp = $get_lowest_price[0];
                } else {
                    $msrp = $arr[$i]['msrp'];
                }
                //get prduct detals sef url
                $comma_separated = Display_DNewProducts::getProductSefUrl($arr[$i]['category_id'], $arr[$i]['alias']);
                $output .= '<div class="span3"><form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $arr[$i]['product_id'] . '" /><div class="view view-first">
				<img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $arr[$i]['image'] . '&h=800&w=800&zc=1&s=1&f=4,9&q=100" alt="' . $arr[$i]['title'] . '">
				<div class="mask"><span class="visible-phone">
					<h2><a href="' . $_SESSION['base_url'] . '/index.php/' . $comma_separated . '">' . $arr[$i]['title'] . '</a> <br/>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $arr[$i]['msrp'] . '</h2>
				</span>
				<span class="hidden-phone"><h2>' . substr(trim($arr[$i]['title']), '0', '10') . ' <br/>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $arr[$i]['msrp'] . '</h2>
				<p><a href="' . $_SESSION['base_url'] . '/index.php/' . $comma_separated . '" class="list_icn"></a> <a  data-toggle="modal" href="#uploadReferenceDocuments" data-id="' . $arr[$i]['product_id'] . '" class="search_icn"></a></p></span>';
                if ($arr[$i]['has_variation'] == 1) {
                    $output .= '<div class="cart-icn_div"><a href="' . $_SESSION['base_url'] . '/index.php/' . $comma_separated . '"><input type="button" value="Add to cart" class="addcart" /></a></div>';
                } else {
                    $output .= '<div class="cart-icn_div"><input type="submit" value="Add to cart" class="btn" /></div>';
                }
                $output .= '</div>
				</div><input type="hidden" name="addtocart" value="' . $arr[$i]['product_id'] . '"></form></div>';
            }
            $output .= '</div>';
        }
        $output .= '</div>
		</div>';
        return $output;
    }
Beispiel #3
0
 function getProductSefUrl($category_id, $alias)
 {
     $sql = "SELECT * FROM  category_table  WHERE category_id='" . $category_id . "' AND category_status =1";
     $obj = new Bin_Query();
     $obj->executeQuery($sql);
     $records = $obj->records[0];
     $cat_subcat_path = trim($obj->records[0]['subcat_path']);
     $category_alias = trim($obj->records[0]['category_alias']);
     $category_name = trim($obj->records[0]['category_name']);
     $subcat_path = explode(',', $cat_subcat_path);
     $categorycount = count($subcat_path);
     if ($categorycount > 0) {
         for ($j = 0; $j < $categorycount; $j++) {
             $sql = "SELECT * FROM  category_table  WHERE category_id='" . $subcat_path[$j] . "' AND category_status =1 ";
             $obj = new Bin_Query();
             $obj->executeQuery($sql);
             $records = $obj->records[0];
             $cat_subcat_path = trim($obj->records[0]['subcat_path']);
             $category_alias = trim($obj->records[0]['category_alias']);
             $category_name = trim($obj->records[0]['category_name']);
             if ($cat_subcat_path == $subcat_path[$j]) {
                 $subcategory = $category_alias;
                 $comma_separated = $subcategory . '/' . $alias . '.html';
             } else {
                 $subcategory = Display_DNewProducts::getSubCatPath($subcat_path[$j]);
                 $comma_separated = $subcategory . '/' . $alias . '.html';
             }
         }
     }
     return $comma_separated;
 }