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


PHP getPatchProductImage函数代码示例

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


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

示例1: listProductUpdateData

function listProductUpdateData($products, $setUrl = 0)
{
    $jshopConfig = JSFactory::getConfig();
    $userShop = JSFactory::getUserShop();
    $taxes = JSFactory::getAllTaxes();
    if ($jshopConfig->product_list_show_manufacturer) {
        $manufacturers = JSFactory::getAllManufacturer();
    }
    if ($jshopConfig->product_list_show_vendor) {
        $vendors = JSFactory::getAllVendor();
    }
    if ($jshopConfig->show_delivery_time) {
        $deliverytimes = JSFactory::getAllDeliveryTime();
    }
    $image_path = $jshopConfig->image_product_live_path;
    $noimage = $jshopConfig->noimage;
    JPluginHelper::importPlugin('jshoppingproducts');
    $dispatcher = JDispatcher::getInstance();
    foreach ($products as $key => $value) {
        $dispatcher->trigger('onListProductUpdateDataProduct', array(&$products, &$key, &$value));
        $use_userdiscount = 1;
        if ($jshopConfig->user_discount_not_apply_prod_old_price && $products[$key]->product_old_price > 0) {
            $use_userdiscount = 0;
        }
        $products[$key]->_original_product_price = $products[$key]->product_price;
        $products[$key]->product_price_wp = $products[$key]->product_price;
        $products[$key]->product_price_default = 0;
        if ($jshopConfig->product_list_show_min_price) {
            if ($products[$key]->min_price > 0) {
                $products[$key]->product_price = $products[$key]->min_price;
            }
        }
        $products[$key]->show_price_from = 0;
        if ($jshopConfig->product_list_show_min_price && $value->different_prices) {
            $products[$key]->show_price_from = 1;
        }
        $products[$key]->product_price = getPriceFromCurrency($products[$key]->product_price, $products[$key]->currency_id);
        $products[$key]->product_old_price = getPriceFromCurrency($products[$key]->product_old_price, $products[$key]->currency_id);
        $products[$key]->product_price_wp = getPriceFromCurrency($products[$key]->product_price_wp, $products[$key]->currency_id);
        $products[$key]->product_price = getPriceCalcParamsTax($products[$key]->product_price, $products[$key]->tax_id);
        $products[$key]->product_old_price = getPriceCalcParamsTax($products[$key]->product_old_price, $products[$key]->tax_id);
        $products[$key]->product_price_wp = getPriceCalcParamsTax($products[$key]->product_price_wp, $products[$key]->tax_id);
        if ($userShop->percent_discount && $use_userdiscount) {
            $products[$key]->product_price_default = $products[$key]->_original_product_price;
            $products[$key]->product_price_default = getPriceFromCurrency($products[$key]->product_price_default, $products[$key]->currency_id);
            $products[$key]->product_price_default = getPriceCalcParamsTax($products[$key]->product_price_default, $products[$key]->tax_id);
            $products[$key]->product_price = getPriceDiscount($products[$key]->product_price, $userShop->percent_discount);
            $products[$key]->product_old_price = getPriceDiscount($products[$key]->product_old_price, $userShop->percent_discount);
            $products[$key]->product_price_wp = getPriceDiscount($products[$key]->product_price_wp, $userShop->percent_discount);
        }
        if ($jshopConfig->list_products_calc_basic_price_from_product_price) {
            $products[$key]->basic_price_info = getProductBasicPriceInfo($value, $products[$key]->product_price_wp);
        } else {
            $products[$key]->basic_price_info = getProductBasicPriceInfo($value, $products[$key]->product_price);
        }
        if ($value->tax_id) {
            $products[$key]->tax = $taxes[$value->tax_id];
        }
        if ($jshopConfig->product_list_show_manufacturer && $value->product_manufacturer_id && isset($manufacturers[$value->product_manufacturer_id])) {
            $products[$key]->manufacturer = $manufacturers[$value->product_manufacturer_id];
        } else {
            $products[$key]->manufacturer = new stdClass();
            $products[$key]->manufacturer->name = '';
        }
        if ($jshopConfig->admin_show_product_extra_field) {
            $products[$key]->extra_field = getProductExtraFieldForProduct($value);
        } else {
            $products[$key]->extra_field = '';
        }
        if ($jshopConfig->product_list_show_vendor) {
            $vendordata = $vendors[$value->vendor_id];
            $vendordata->products = SEFLink("index.php?option=com_jshopping&controller=vendor&task=products&vendor_id=" . $vendordata->id, 1);
            $products[$key]->vendor = $vendordata;
        } else {
            $products[$key]->vendor = '';
        }
        if ($jshopConfig->hide_delivery_time_out_of_stock && $products[$key]->product_quantity <= 0) {
            $products[$key]->delivery_times_id = 0;
            $value->delivery_times_id = 0;
        }
        if ($jshopConfig->show_delivery_time && $value->delivery_times_id) {
            $products[$key]->delivery_time = $deliverytimes[$value->delivery_times_id];
        } else {
            $products[$key]->delivery_time = '';
        }
        $products[$key]->_display_price = getDisplayPriceForProduct($products[$key]->product_price);
        if (!$products[$key]->_display_price) {
            $products[$key]->product_old_price = 0;
            $products[$key]->product_price_default = 0;
            $products[$key]->basic_price_info['price_show'] = 0;
            $products[$key]->tax = 0;
            $jshopConfig->show_plus_shipping_in_product = 0;
        }
        if ($jshopConfig->product_list_show_qty_stock) {
            $products[$key]->qty_in_stock = getDataProductQtyInStock($products[$key]);
        }
        $image = getPatchProductImage($products[$key]->image, 'thumb');
        $products[$key]->product_name_image = $products[$key]->image;
        $products[$key]->product_thumb_image = $image;
        if (!$image) {
//.........这里部分代码省略.........
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:101,代码来源:functions.php

示例2: loadproductinfo

 function loadproductinfo()
 {
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     JPluginHelper::importPlugin('jshoppingadmin');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onLoadInfoProduct', array());
     $id_vendor_cuser = getIdVendorForCUser();
     $product_id = JRequest::getInt('product_id');
     $layout = JRequest::getVar('layout', 'productinfo_json');
     if ($id_vendor_cuser && $product_id) {
         checkAccessVendorToProduct($id_vendor_cuser, $product_id);
     }
     $products = $this->getModel("products");
     $product = JTable::getInstance('product', 'jshop');
     $product->load($product_id);
     $product->getDescription();
     $res = array();
     $res['product_id'] = $product->product_id;
     $res['product_ean'] = $product->product_ean;
     $res['product_price'] = $product->product_price;
     $res['delivery_times_id'] = $product->delivery_times_id;
     $res['vendor_id'] = fixRealVendorId($product->vendor_id);
     $res['product_weight'] = $product->product_weight;
     $res['product_tax'] = $product->getTax();
     $res['product_name'] = $product->name;
     $res['thumb_image'] = getPatchProductImage($product->image, 'thumb');
     $view = $this->getView("product_edit", 'html');
     $view->setLayout($layout);
     $view->assign('res', $res);
     $view->assign('edit', null);
     $view->assign('product', $product);
     $dispatcher->trigger('onBeforeDisplayLoadInfoProduct', array(&$view));
     $view->display();
     die;
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:36,代码来源:products.php

示例3: getPatchProductImage

            <?php 
        }
        ?>
        </div>
    <?php 
    }
    ?>
    <?php 
    if ($row->image) {
        ?>
        <a href="index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php 
        print $row->product_id;
        ?>
">
            <img src="<?php 
        print getPatchProductImage($row->image, 'thumb', 1);
        ?>
" width="90" border="0" />
        </a>
    <?php 
    }
    ?>
   </td>
   <td>
     <b><a href="index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php 
    print $row->product_id;
    ?>
"><?php 
    echo $row->name;
    ?>
</a></b>
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:default.php

示例4: getImages

 function getImages()
 {
     if (isset($this->attribute_active_data->ext_data) && $this->attribute_active_data->ext_data) {
         $list = $this->attribute_active_data->ext_data->getImages();
         if (count($list)) {
             return $list;
         }
     }
     $query = "SELECT I.*, IF(P.image=I.image_name,0,1) as sort FROM `#__jshopping_products_images` as I left join `#__jshopping_products` as P on P.product_id=I.product_id\n                 WHERE I.product_id = '" . $this->_db->escape($this->product_id) . "' ORDER BY sort, I.ordering";
     $this->_db->setQuery($query);
     $list = $this->_db->loadObjectList();
     foreach ($list as $k => $v) {
         $title = $v->name;
         if (!$title) {
             $title = $this->getName();
         }
         $list[$k]->_title = $title;
         $list[$k]->image_thumb = getPatchProductImage($v->image_name, 'thumb');
         $list[$k]->image_full = getPatchProductImage($v->image_name, 'full');
     }
     return $list;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:22,代码来源:product.php

示例5: getPatchProductImage

            <a href="index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php 
    print $row->product_id;
    ?>
">
            <?php 
    if (strlen($row->image) > 0) {
        ?>
                <img src="<?php 
        print getPatchProductImage($row->image, 'thumb', 1);
        ?>
" width="90" border="0" />
            <?php 
    } else {
        ?>
                <img src="<?php 
        print getPatchProductImage($this->config->noimage, '', 1);
        ?>
" width="90" border="0" />
            <?php 
    }
    ?>
            </a>
        </div>
        <div style="padding-top:5px;"><input type="button" class="btn btn-small btn-success" value="<?php 
    print _JSHOP_ADD;
    ?>
" onclick="add_to_list_relatad(<?php 
    print $row->product_id;
    ?>
)"></div>
    </div>
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:31,代码来源:search_related.php

示例6: htmlspecialchars

">
            <input type="text" name="old_image_descr[<?php 
        print $image->image_id;
        ?>
]" value="<?php 
        print htmlspecialchars($image->name);
        ?>
" size="22" class="middle" />
            <div style="height:3px;"></div>
            <div style="padding-bottom:5px;padding-right:5px;">
                <a class="modal" href="<?php 
        echo getPatchProductImage($image->image_name, 'full', 1);
        ?>
" rel="{handler: 'image'}">
                <img style="cursor:pointer" src="<?php 
        echo getPatchProductImage($image->image_name, 'thumb', 1);
        ?>
" alt="" />
                </a>
            </div>
            <?php 
        print _JSHOP_ORDERING;
        ?>
: <input type="text" name="old_image_ordering[<?php 
        print $image->image_id;
        ?>
]" value="<?php 
        print $image->ordering;
        ?>
" class="small" />
            <div style="height:3px;"></div>
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:31,代码来源:images.php

示例7: add


//.........这里部分代码省略.........
                 }
                 if (!$product->unlimited && $jshopConfig->controler_buy_qty && $sum_quantity > $qtyInStock) {
                     $balans = $qtyInStock - $product_in_cart;
                     if ($balans < 0) {
                         $balans = 0;
                     }
                     JError::raiseWarning('', sprintf(_JSHOP_ERROR_EXIST_QTY_PRODUCT_IN_CART, $this->products[$key]['quantity'], $balans));
                     return 0;
                 }
                 $this->products[$key]['quantity'] = $save_quantity;
                 $this->products[$key]['price'] = $product->getPrice($this->products[$key]['quantity'], 1, 1, 1, $this->products[$key]);
                 if ($jshopConfig->cart_basic_price_show) {
                     $this->products[$key]['basicprice'] = $product->getBasicPrice();
                 }
                 $dispatcher->trigger('onBeforeSaveUpdateProductToCart', array(&$this, &$product, $key));
                 $new_product = 0;
                 break;
             }
         }
     }
     if ($new_product) {
         $product_in_cart = 0;
         foreach ($this->products as $key2 => $value2) {
             if ($value2['pid_check_qty_value'] == $pidCheckQtyValue) {
                 $product_in_cart += $value2["quantity"];
             }
         }
         $sum_quantity = $product_in_cart + $quantity;
         if ($jshopConfig->max_count_order_one_product && $sum_quantity > $jshopConfig->max_count_order_one_product) {
             JError::raiseNotice('', sprintf(_JSHOP_ERROR_MAX_COUNT_ORDER_ONE_PRODUCT, $jshopConfig->max_count_order_one_product));
             return 0;
         }
         if ($jshopConfig->min_count_order_one_product && $sum_quantity < $jshopConfig->min_count_order_one_product) {
             JError::raiseNotice('', sprintf(_JSHOP_ERROR_MIN_COUNT_ORDER_ONE_PRODUCT, $jshopConfig->min_count_order_one_product));
             return 0;
         }
         if (!$product->unlimited && $jshopConfig->controler_buy_qty && $sum_quantity > $qtyInStock) {
             $balans = $qtyInStock - $product_in_cart;
             if ($balans < 0) {
                 $balans = 0;
             }
             JError::raiseWarning('', sprintf(_JSHOP_ERROR_EXIST_QTY_PRODUCT, $balans));
             return 0;
         }
         $product->getDescription();
         $temp_product['quantity'] = $quantity;
         $temp_product['product_id'] = $product_id;
         $temp_product['category_id'] = $product->getCategory();
         $temp_product['tax'] = $product->getTax();
         $temp_product['tax_id'] = $product->product_tax_id;
         $temp_product['product_name'] = $product->name;
         $temp_product['thumb_image'] = getPatchProductImage($product->getData('image'), 'thumb');
         $temp_product['delivery_times_id'] = $product->delivery_times_id;
         $temp_product['ean'] = $product->getEan();
         $temp_product['attributes'] = $attr_serialize;
         $temp_product['attributes_value'] = array();
         $temp_product['extra_fields'] = array();
         $temp_product['weight'] = $product->getWeight();
         $temp_product['vendor_id'] = fixRealVendorId($product->vendor_id);
         $temp_product['files'] = serialize($product->getSaleFiles());
         $temp_product['freeattributes'] = $free_attr_serialize;
         if ($jshopConfig->show_manufacturer_in_cart) {
             $manufacturer_info = $product->getManufacturerInfo();
             $temp_product['manufacturer'] = $manufacturer_info->name;
         } else {
             $temp_product['manufacturer'] = '';
         }
         $temp_product['pid_check_qty_value'] = $pidCheckQtyValue;
         $i = 0;
         if (is_array($attr_id) && count($attr_id)) {
             foreach ($attr_id as $key => $value) {
                 $attr = JTable::getInstance('attribut', 'jshop');
                 $attr_v = JTable::getInstance('attributvalue', 'jshop');
                 $temp_product['attributes_value'][$i] = new stdClass();
                 $temp_product['attributes_value'][$i]->attr_id = $key;
                 $temp_product['attributes_value'][$i]->value_id = $value;
                 $temp_product['attributes_value'][$i]->attr = $attr->getName($key);
                 $temp_product['attributes_value'][$i]->value = $attr_v->getName($value);
                 $i++;
             }
         }
         if ($jshopConfig->admin_show_product_extra_field && count($jshopConfig->getCartDisplayExtraFields()) > 0) {
             $extra_field = $product->getExtraFields(2);
             $temp_product['extra_fields'] = $extra_field;
         }
         $dispatcher->trigger('onBeforeSaveNewProductToCartBPC', array(&$this, &$temp_product, &$product));
         $temp_product['price'] = $product->getPrice($quantity, 1, 1, 1, $temp_product);
         if ($jshopConfig->cart_basic_price_show) {
             $temp_product['basicprice'] = $product->getBasicPrice();
             $temp_product['basicpriceunit'] = $product->getBasicPriceUnit();
         }
         $dispatcher->trigger('onBeforeSaveNewProductToCart', array(&$this, &$temp_product, &$product));
         $this->products[] = $temp_product;
     }
     $this->loadPriceAndCountProducts();
     $this->reloadRabatValue();
     $this->saveToSession();
     $dispatcher->trigger('onAfterAddProductToCart', array(&$this, &$product_id, &$quantity, &$attr_id, &$freeattributes));
     return 1;
 }
开发者ID:Tommar,项目名称:vino2,代码行数:101,代码来源:cart.php

示例8: getPatchProductImage

    print $row_related->product_id;
    ?>
">
                <div class="block_related_inner">
                    <div class="name"><?php 
    echo $row_related->name;
    ?>
 (ID:&nbsp;<?php 
    print $row_related->product_id;
    ?>
)</div>
                    <div class="image"><a href="index.php?option=com_jshopping&controller=products&task=edit&product_id=<?php 
    print $row_related->product_id;
    ?>
"><img src="<?php 
    print getPatchProductImage($row_related->image, 'thumb', 1);
    ?>
" width="90" border="0" /></a></div>
                    <div style="padding-top:5px;"><input type="button" class="btn btn-danger btn-small" value="<?php 
    print _JSHOP_DELETE;
    ?>
" onclick="delete_related(<?php 
    print $row_related->product_id;
    ?>
)"></div>
                    <input type="hidden" name="related_products[]" value="<?php 
    print $row_related->product_id;
    ?>
"/>
                </div>
            </div>
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:related.php


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