本文整理汇总了PHP中osc_image函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_image函数的具体用法?PHP osc_image怎么用?PHP osc_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize()
{
$OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null;
$OSCOM_Customer = Registry::get('Customer');
$OSCOM_Database = Registry::get('Database');
$OSCOM_Language = Registry::get('Language');
$this->_title_link = OSCOM::getLink(null, 'Account', 'Notifications', 'SSL');
if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) {
if ($OSCOM_Customer->isLoggedOn()) {
$Qcheck = $OSCOM_Database->query('select global_product_notifications from :table_customers where customers_id = :customers_id');
$Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID());
$Qcheck->execute();
if ($Qcheck->valueInt('global_product_notifications') === 0) {
$Qcheck = $OSCOM_Database->query('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1');
$Qcheck->bindInt(':products_id', $OSCOM_Product->getID());
$Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID());
$Qcheck->execute();
if ($Qcheck->numberOfRows() > 0) {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle()))) . '</div>' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle()));
} else {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle()))) . '</div>' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle()));
}
$this->_content .= '<div style="clear: both;"></div>';
}
}
}
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:27,代码来源:Controller.php
示例2: site_logo
/**
* Echo Site logo
*
* @access public
* @return string
*/
function site_logo()
{
global $osC_Template;
$logo = $osC_Template->getLogo();
$logo = $logo == 'images/store_logo.png' ? 'templates/' . $osC_Template->getCode() . '/images/store_logo.png' : $logo;
return osc_link_object(osc_href_link(FILENAME_DEFAULT), osc_image($logo, STORE_NAME), 'id="siteLogo"');
}
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:13,代码来源:helper.php
示例3: initialize
function initialize()
{
global $osC_Database, $osC_Language;
$Qmanufacturers = $osC_Database->query('select m.manufacturers_id as id, m.manufacturers_name as text, m.manufacturers_image as image from :table_manufacturers m, :table_manufacturers_info mi where m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id order by manufacturers_name');
$Qmanufacturers->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
$Qmanufacturers->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
$Qmanufacturers->bindInt(':languages_id', $osC_Language->getID());
$Qmanufacturers->setCache('box-manufacturers-' . $osC_Language->getCode(), 100);
$Qmanufacturers->execute();
if (BOX_MANUFACTURERS_LIST_TYPE == 'ComboBox') {
$manufacturers_array = array(array('id' => '', 'text' => $osC_Language->get('pull_down_default')));
while ($Qmanufacturers->next()) {
$manufacturers_array[] = $Qmanufacturers->toArray();
}
$this->_content = '<form name="manufacturers" action="' . osc_href_link(FILENAME_DEFAULT, null, 'NONSSL', false) . '" method="get">' . osc_draw_pull_down_menu('manufacturers', $manufacturers_array, null, 'onchange="this.form.submit();" size="' . BOX_MANUFACTURERS_LIST_SIZE . '" style="width: 99%"') . osc_draw_hidden_session_id_field() . '</form>';
} else {
$this->_content = '<ul>';
while ($Qmanufacturers->next()) {
$manufacturers_image = $Qmanufacturers->value('image');
if (!empty($manufacturers_image) && file_exists(DIR_WS_IMAGES . 'manufacturers/' . $Qmanufacturers->value('image'))) {
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturers->valueInt('id')), osc_image("images/manufacturers/" . $Qmanufacturers->value('image'), $Qmanufacturers->value('text'))) . '</li>';
}
}
$this->_content .= '</ul>';
}
$Qmanufacturers->freeResult();
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:27,代码来源:manufacturers.php
示例4: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Product;
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) {
$Qmanufacturer = $osC_Database->query('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
$Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
$Qmanufacturer->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
$Qmanufacturer->bindTable(':table_products', TABLE_PRODUCTS);
$Qmanufacturer->bindInt(':languages_id', $osC_Language->getID());
$Qmanufacturer->bindInt(':products_id', $osC_Product->getID());
$Qmanufacturer->execute();
if ($Qmanufacturer->numberOfRows()) {
$this->_content = '';
if (!osc_empty($Qmanufacturer->value('manufacturers_image'))) {
$this->_content .= '<div style="text-align: center;">' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), osc_image(DIR_WS_IMAGES . 'manufacturers/' . $Qmanufacturer->value('manufacturers_image'), $Qmanufacturer->value('manufacturers_name'))) . '</div>';
}
$this->_content .= '<ol style="list-style: none; margin: 0; padding: 0;">';
if (!osc_empty($Qmanufacturer->value('manufacturers_url'))) {
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')), sprintf($osC_Language->get('box_manufacturer_info_website'), $Qmanufacturer->value('manufacturers_name')), 'target="_blank"') . '</li>';
}
$this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), $osC_Language->get('box_manufacturer_info_products')) . '</li>';
$this->_content .= '</ol>';
}
}
}
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:25,代码来源:manufacturer_info.php
示例5: quote
function quote()
{
global $osC_Language, $osC_ShoppingCart, $osC_Weight;
if (MODULE_SHIPPING_TABLE_MODE == 'price') {
$order_total = $osC_ShoppingCart->getSubTotal();
} else {
$order_total = $osC_Weight->convert($osC_ShoppingCart->getWeight(), SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_TABLE_WEIGHT_UNIT);
}
//fix the shipping cost calculating bug
if (!is_int($order_total) && strpos($order_total, ',') !== false) {
$order_total = str_replace(',', '', $order_total);
$order_total = (int) $order_total;
}
$table_cost = split("[:,]", MODULE_SHIPPING_TABLE_COST);
$size = sizeof($table_cost);
for ($i = 0, $n = $size; $i < $n; $i += 2) {
if ($order_total <= $table_cost[$i]) {
$shipping = $table_cost[$i + 1];
break;
}
}
if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
$shipping = $shipping * $osC_ShoppingCart->numberOfShippingBoxes();
}
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => $osC_Language->get('shipping_table_method'), 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)), 'tax_class_id' => $this->tax_class);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
return $this->quotes;
}
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:30,代码来源:table.php
示例6: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Product, $osC_Customer;
$this->_title_link = osc_href_link(FILENAME_ACCOUNT, 'notifications', 'SSL');
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) {
if ($osC_Customer->isLoggedOn()) {
$Qcheck = $osC_Database->query('select global_product_notifications from :table_customers where customers_id = :customers_id');
$Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qcheck->bindInt(':customers_id', $osC_Customer->getID());
$Qcheck->execute();
if ($Qcheck->valueInt('global_product_notifications') === 0) {
$Qcheck = $osC_Database->query('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1');
$Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qcheck->bindInt(':products_id', $osC_Product->getID());
$Qcheck->bindInt(':customers_id', $osC_Customer->getID());
$Qcheck->execute();
if ($Qcheck->numberOfRows() > 0) {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', sprintf($osC_Language->get('box_product_notifications_remove'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_remove'), $osC_Product->getTitle()));
} else {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()));
}
$this->_content .= '<div style="clear: both;"></div>';
}
} else {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle())) . '<div style="clear: both;"></div>';
}
}
}
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:28,代码来源:product_notifications.php
示例7: initialize
function initialize()
{
global $osC_Language, $osC_Template, $osC_ShoppingCart;
$steps = array();
if ($osC_ShoppingCart->getContentType() != 'virtual') {
$steps[] = array('title' => $osC_Language->get('box_ordering_steps_delivery'), 'code' => 'shipping', 'active' => $osC_Template->getModule() == 'shipping' || $osC_Template->getModule() == 'shipping_address' ? true : false);
}
$steps[] = array('title' => $osC_Language->get('box_ordering_steps_payment'), 'code' => 'payment', 'active' => $osC_Template->getModule() == 'payment' || $osC_Template->getModule() == 'payment_address' ? true : false);
$steps[] = array('title' => $osC_Language->get('box_ordering_steps_confirmation'), 'code' => 'confirmation', 'active' => $osC_Template->getModule() == 'confirmation' ? true : false);
$steps[] = array('title' => $osC_Language->get('box_ordering_steps_complete'), 'active' => $osC_Template->getModule() == 'success' ? true : false);
$content = osc_image('templates/' . $osC_Template->getCode() . '/images/icons/32x32/checkout_preparing_to_ship.gif') . '<br />';
$counter = 0;
foreach ($steps as $step) {
$counter++;
$content .= '<span style="white-space: nowrap;"> ' . osc_image('templates/' . $osC_Template->getCode() . '/images/icons/24x24/checkout_' . $counter . ($step['active'] === true ? '_on' : '') . '.gif', $step['title'], 24, 24, 'align="absmiddle"');
if (isset($step['code'])) {
$content .= osc_link_object(osc_href_link(FILENAME_CHECKOUT, $step['code'], 'SSL'), $step['title'], 'class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '"');
} else {
$content .= '<span class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '">' . $step['title'] . '</span>';
}
$content .= '</span><br />';
}
$content .= osc_image('templates/' . $osC_Template->getCode() . '/images/icons/32x32/checkout_ready_to_ship.gif');
$this->_content = $content;
}
开发者ID:heshuai64,项目名称:gamestore,代码行数:25,代码来源:checkout_trail.php
示例8: getData
function getData($id)
{
global $osC_Database, $osC_Language;
$Qreview = $osC_Database->query('select r.*, pd.products_name from :table_reviews r left join :table_products_description pd on (r.products_id = pd.products_id and r.languages_id = pd.language_id) where r.reviews_id = :reviews_id');
$Qreview->bindTable(':table_reviews', TABLE_REVIEWS);
$Qreview->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qreview->bindInt(':reviews_id', $id);
$Qreview->execute();
$data = $Qreview->toArray();
$data['reviews_rating'] = osc_image('../images/stars_' . $Qreview->valueInt('reviews_rating') . '.png', sprintf($osC_Language->get('rating_from_5_stars'), $Qreview->valueInt('reviews_rating')));
$data['detailed_rating'] = $Qreview->valueInt('reviews_rating');
$Qaverage = $osC_Database->query('select (avg(reviews_rating) / 5 * 100) as average_rating from :table_reviews where products_id = :products_id');
$Qaverage->bindTable(':table_reviews', TABLE_REVIEWS);
$Qaverage->bindInt(':products_id', $Qreview->valueInt('products_id'));
$Qaverage->execute();
$data['average_rating'] = $Qaverage->value('average_rating');
$ratings = self::getCustomersRatings($id);
if (is_array($ratings) && !empty($ratings)) {
$data['ratings'] = $ratings;
} else {
$data['ratings'] = null;
}
$Qaverage->freeResult();
$Qreview->freeResult();
return $data;
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:26,代码来源:reviews.php
示例9: osc_icon
/**
* Display an icon from a template set
*
* @param string $image The icon to display
* @param string $title The title of the icon
* @param string $group The size group of the icon
* @param string $parameters The parameters to pass to the image
* @access public
*/
function osc_icon($image, $title = null, $group = '16x16', $parameters = null)
{
global $osC_Language;
if (is_null($title)) {
$title = $osC_Language->get('icon_' . substr($image, 0, strpos($image, '.')));
}
return osc_image('templates/default/images/icons/' . (!empty($group) ? $group . '/' : null) . $image, $title, null, null, $parameters);
}
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:17,代码来源:html_output.php
示例10: install
function install()
{
global $osC_Database, $osC_Language;
parent::install();
$image = osc_image('images/adsense_script.gif');
$osC_Database->simpleQuery("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('" . $osC_Language->get('box_google_adsense_code') . "', 'BOX_GOOGLE_ADSENSE_CODE', '', 'Please add the google javasript block', '6', '0', 'osc_cfg_set_textarea_field', now())");
$osC_Database->simpleQuery("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('" . $osC_Language->get('box_google_adsense_example_code') . "', 'BOX_GOOGLE_ADSENSE_EXAMPLE_CODE', '" . $image . "' , 'Please add the google javasript block as this example code', '6', '0', 'osc_cfg_set_panel', now())");
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:8,代码来源:google_adsense.php
示例11: quote
public function quote()
{
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => OSCOM::getDef('shipping_flat_method'), 'cost' => MODULE_SHIPPING_FLAT_COST)), 'tax_class_id' => $this->tax_class);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
return $this->quotes;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:8,代码来源:Flat.php
示例12: listCustomers
function listCustomers()
{
global $toC_Json, $osC_Database, $osC_Language;
$osC_Currencies = new osC_Currencies_Admin();
$start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
$limit = empty($_REQUEST['limit']) ? MAX_DISPLAY_SEARCH_RESULTS : $_REQUEST['limit'];
$Qcustomers = $osC_Database->query('select c.customers_id, c.customers_credits, c.customers_gender, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_status, c.customers_ip_address, c.date_account_created, c.number_of_logons, c.date_last_logon, cgd.customers_groups_name from :table_customers c left join :table_customers_groups_description cgd on (c.customers_groups_id = cgd.customers_groups_id and cgd.language_id = :language_id)');
$Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qcustomers->bindTable(':table_customers_groups_description', TABLE_CUSTOMERS_GROUPS_DESCRIPTION);
$Qcustomers->bindInt(':language_id', $osC_Language->getID());
if (isset($_REQUEST['search']) && !empty($_REQUEST['search'])) {
$Qcustomers->appendQuery('where c.customers_lastname like :customers_lastname or c.customers_firstname like :customers_firstname and c.customers_email_address like :customers_email_address');
$Qcustomers->bindValue(':customers_lastname', '%' . $_REQUEST['search'] . '%');
$Qcustomers->bindValue(':customers_firstname', '%' . $_REQUEST['search'] . '%');
$Qcustomers->bindValue(':customers_email_address', '%' . $_REQUEST['search'] . '%');
}
$Qcustomers->appendQuery('order by c.customers_lastname, c.customers_firstname');
$Qcustomers->setExtBatchLimit($start, $limit);
$Qcustomers->execute();
require_once 'includes/classes/geoip.php';
$osC_GeoIP = osC_GeoIP_Admin::load();
if ($osC_GeoIP->isInstalled()) {
$osC_GeoIP->activate();
}
$records = array();
while ($Qcustomers->next()) {
$geoip = '';
$iso_code_2 = $osC_GeoIP->getCountryISOCode2($Qcustomers->value('customers_ip_address'));
if ($osC_GeoIP->isActive() && $osC_GeoIP->isValid($Qcustomers->value('customers_ip_address')) && !empty($iso_code_2)) {
$geoip = osc_image('../images/worldflags/' . $iso_code_2 . '.png', $country . ', ' . $Qcustomers->value('customers_ip_address'), 18, 12) . ' ' . $Qcustomers->value('customers_ip_address');
} else {
$geoip = $Qcustomers->value('customers_ip_address');
}
$customers_info = '<table width="100%" cellspacing="5">' . '<tbody>' . '<tr>
<td width="150">' . $osC_Language->get('field_gender') . '</td>
<td>' . ($Qcustomers->value('customers_gender') == 'm' ? $osC_Language->get('gender_male') : $osC_Language->get('gender_female')) . '</td>
</tr>' . '<tr>
<td>' . $osC_Language->get('field_email_address') . '</td>
<td>' . $Qcustomers->value('customers_email_address') . '</td>
</tr>' . '<tr>
<td>' . $osC_Language->get('field_customers_group') . '</td>
<td>' . $Qcustomers->value('customers_groups_name') . '</td>
</tr>' . '<tr>
<td>' . $osC_Language->get('field_ip_address') . '</td>
<td>' . $geoip . '</td>
</tr>' . '<tr>
<td>' . $osC_Language->get('field_number_of_logons') . '</td>
<td>' . $Qcustomers->valueInt('number_of_logons') . '</td>
</tr>' . '<tr>
<td>' . $osC_Language->get('field_date_last_logon') . '</td>
<td>' . osC_DateTime::getShort($Qcustomers->value('date_last_logon')) . '</td>
</tr>' . '</tbody>' . '</table>';
$records[] = array('customers_id' => $Qcustomers->valueInt('customers_id'), 'customers_lastname' => $Qcustomers->value('customers_lastname'), 'customers_firstname' => $Qcustomers->value('customers_firstname'), 'customers_credits' => $osC_Currencies->format($Qcustomers->value('customers_credits')), 'date_account_created' => osC_DateTime::getShort($Qcustomers->value('date_account_created')), 'customers_status' => $Qcustomers->valueInt('customers_status'), 'customers_info' => $customers_info);
}
$Qcustomers->freeResult();
$response = array(EXT_JSON_READER_TOTAL => $Qcustomers->getBatchSize(), EXT_JSON_READER_ROOT => $records);
echo $toC_Json->encode($response);
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:58,代码来源:customers.php
示例13: quote
function quote()
{
global $osC_Language;
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => $osC_Language->get('shipping_self_pickup_method'), 'cost' => 0)), 'tax_class_id' => 0);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
return $this->quotes;
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:9,代码来源:selfpickup.php
示例14: quote
function quote()
{
global $osC_Language, $osC_ShoppingCart;
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => $osC_Language->get('shipping_item_method'), 'cost' => MODULE_SHIPPING_ITEM_COST * $osC_ShoppingCart->numberOfItems() + MODULE_SHIPPING_ITEM_HANDLING)), 'tax_class_id' => $this->tax_class);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
return $this->quotes;
}
开发者ID:heshuai64,项目名称:gamestore,代码行数:9,代码来源:item.php
示例15: quote
function quote()
{
global $osC_Language, $osC_Currencies;
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => sprintf($osC_Language->get('shipping_free_for_amount'), $osC_Currencies->format(MODULE_SHIPPING_FREE_MINIMUM_ORDER)), 'cost' => 0)), 'tax_class_id' => 0);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
return $this->quotes;
}
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:9,代码来源:free.php
示例16: osc_icon
/**
* Display an icon from a template set
*
* @param string $image The icon to display
* @param string $title The title of the icon
* @param string $group The size group of the icon
* @param string $parameters The parameters to pass to the image
* @access public
*/
function osc_icon($image, $title = null, $group = null, $parameters = null)
{
if (is_null($title)) {
$title = OSCOM::getDef('icon_' . substr($image, 0, strpos($image, '.')));
}
if (is_null($group)) {
$group = '16x16';
}
return osc_image(OSCOM::getPublicSiteLink('templates/' . Registry::get('Template')->getCode() . '/images/icons/' . (!empty($group) ? $group . '/' : null) . $image), $title, null, null, $parameters);
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:19,代码来源:html_output.php
示例17: checkout_initialization_method
function checkout_initialization_method()
{
global $osC_Language;
if (file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'modules/payment/paypal/btn_express_' . basename($osC_Language->getCode()) . '.gif')) {
$image = DIR_WS_IMAGES . 'modules/payment/paypal/btn_express_' . basename($osC_Language->getCode()) . '.gif';
} else {
$image = DIR_WS_IMAGES . 'modules/payment/paypal/btn_express.gif';
}
$string = osc_link_object(osc_href_link(FILENAME_CHECKOUT, 'callback&module=paypal_express'), osc_image($image, $osC_Language->get('payment_paypal_express_button_title')));
return $string;
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:11,代码来源:paypal_express.php
示例18: quote
public function quote()
{
global $osC_ShoppingCart, $osC_Weight;
$dest_country = $osC_ShoppingCart->getShippingAddress('country_iso_code_2');
$dest_zone = 0;
$error = false;
$shipping_method = null;
$shipping_cost = null;
$shipping_weight = 0;
foreach ($osC_ShoppingCart->getProducts() as $product) {
$osC_Product = new osC_Product($product['id']);
if ($osC_Product->isTypeActionAllowed('apply_shipping_fees')) {
$shipping_weight += $osC_Weight->convert($product['weight'], SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_ZONES_WEIGHT_UNIT) * $product['quantity'];
}
}
for ($i = 1; $i <= $this->num_zones; $i++) {
$countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
$country_zones = preg_split("/[,]/", $countries_table);
if (in_array($dest_country, $country_zones)) {
$dest_zone = $i;
break;
}
}
if ($dest_zone == 0) {
$error = true;
} else {
$shipping = -1;
$zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone);
$zones_table = preg_split("/[:,]/", $zones_cost);
$size = sizeof($zones_table);
for ($i = 0; $i < $size; $i += 2) {
if ($shipping_weight <= $zones_table[$i]) {
$shipping = $zones_table[$i + 1];
$shipping_method = __('shipping_zones_method') . ' ' . $dest_country . ' : ' . $osC_Weight->display($osC_ShoppingCart->getWeight(), MODULE_SHIPPING_ZONES_WEIGHT_UNIT);
break;
}
}
if ($shipping == -1) {
$shipping_cost = 0;
$shipping_method = __('shipping_zones_undefined_rate');
} else {
$shipping_cost = $shipping * $osC_ShoppingCart->numberOfShippingBoxes() + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);
}
}
$this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => $shipping_method, 'cost' => $shipping_cost)), 'tax_class_id' => $this->tax_class);
if (!empty($this->icon)) {
$this->quotes['icon'] = osc_image($this->icon, $this->_title);
}
if ($error == true) {
$this->quotes['error'] = __('shipping_zones_invalid_zone');
}
return $this->quotes;
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:53,代码来源:zones.php
示例19: initialize
function initialize()
{
global $osC_Database, $osC_Services, $osC_Language, $osC_Image, $osC_Template;
$Qimages = $osC_Database->query('select image ,image_url, description from :table_slide_images where language_id =:language_id and status = 1 order by sort_order desc');
$Qimages->bindTable(':table_slide_images', TABLE_SLIDE_IMAGES);
$Qimages->bindInt(':language_id', $osC_Language->getID());
$Qimages->setCache('slide-images-' . $osC_Language->getCode());
$Qimages->execute();
if ($Qimages->numberOfRows() > 0) {
$tmp = array();
for ($i = 0; $i < $Qimages->numberOfRows(); $i++) {
$tmp[] = $i;
}
$items = 'items: [' . implode(',', $tmp) . '],';
$this->_content = '<div style="overflow: auto; height: 100%; margin: 0px auto;">' . "\n" . '<div id="slideWrapper">' . "\n" . '<div id="slideItems">' . "\n";
$descriptions = array();
while ($Qimages->next()) {
$this->_content .= '<span><a href="' . $Qimages->value('image_url') . '">' . osc_image(DIR_WS_IMAGES . $Qimages->value('image'), $Qimages->value('description')) . '</a></span>' . "\n";
$descriptions[] = '{description:\'' . $Qimages->value('description') . '\', link:\'' . $Qimages->value('image_url') . '\'}';
}
$info_div = '';
$info_css = '';
$info_js = '';
$info_on_walk_js = '';
if (MODULE_CONTENT_SLIDE_SHOW_DISPLAY_INFO == 'True') {
$info_div = '<div id="slideInfo"></div>' . "\n";
$info_css = '#slideInfo{bottom:0;}' . "\n" . '#slideInfo{width:' . MODULE_CONTENT_SLIDE_SHOW_WIDTH . 'px; height:40px; background:#000; position:absolute;}' . "\n" . '#slideInfo p{color:#fff;padding:3px 8px;font-family:Arial;font-size:13px;}' . "\n" . '#slideInfo a{float:right;background:#fff;color:#000;font-size:10px;margin:5px 5px;width:30px;text-decoration:none;text-align:center}' . "\n";
$info_js = 'var slide_info = $(\'slideInfo\').set(\'opacity\',0.5);' . "\n" . 'var infoItems =[' . implode(",", $descriptions) . '];' . "\n";
$items = 'items: infoItems,';
$info_on_walk_js = ',
onWalk: function(currentItem){
slide_info.empty();
new Element(\'a\', {href: currentItem.link}).appendText(\'link\').inject(slide_info);
new Element(\'p\').set(\'html\',currentItem.description).inject(slide_info);
}';
}
$this->_content .= '</div>' . "\n" . $info_div . '</div>
</div>' . "\n";
$css = '#slideWrapper{position:relative; width:' . MODULE_CONTENT_SLIDE_SHOW_WIDTH . 'px; height:' . MODULE_CONTENT_SLIDE_SHOW_HEIGHT . 'px; overflow:hidden;}' . chr(13) . '#slideItems{position:absolute;}' . chr(13) . '#slideItems span{display:block; float:left;}' . chr(13) . '#slideItems span img{display:block;border:none;}' . chr(13) . $info_css;
$osC_Template->addStyleDeclaration($css);
$osC_Template->addJavascriptFilename('ext/noobslide/noobslide.js');
$size = MODULE_CONTENT_SLIDE_SHOW_MODE == 'horizontal' ? MODULE_CONTENT_SLIDE_SHOW_WIDTH : MODULE_CONTENT_SLIDE_SHOW_HEIGHT;
$this->_content .= ' <script type="text/javascript">
window.addEvent(\'domready\',function(){' . $info_js . '
var slide_show = new noobSlide({
mode: \'' . MODULE_CONTENT_SLIDE_SHOW_MODE . '\',' . $items . 'size: ' . $size . ',
box: $(\'slideItems\'),
interval: ' . MODULE_CONTENT_SLIDE_SHOW_INTERVAL . ',
duration: ' . MODULE_CONTENT_SLIDE_SHOW_DURATION . ',' . 'autoPlay: true' . $info_on_walk_js . '});
});' . '</script>';
}
$Qimages->freeResult();
}
开发者ID:Doluci,项目名称:tomatocart,代码行数:53,代码来源:slide_show.php
示例20: initialize
function initialize()
{
global $osC_Database, $osC_Services, $osC_Cache, $osC_Language, $osC_Product, $osC_Image;
$this->_title_link = osc_href_link(FILENAME_PRODUCTS, 'reviews');
if ($osC_Services->isStarted('reviews')) {
if (BOX_REVIEWS_CACHE > 0 && $osC_Cache->read('box-reviews' . (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid() ? '-' . $osC_Product->getID() : '') . '-' . $osC_Language->getCode(), BOX_REVIEWS_CACHE)) {
$data = $osC_Cache->getCache();
} else {
$data = array();
$Qreview = $osC_Database->query('select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1');
$Qreview->bindTable(':table_reviews', TABLE_REVIEWS);
$Qreview->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
$Qreview->bindTable(':table_products', TABLE_PRODUCTS);
$Qreview->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qreview->bindInt(':default_flag', 1);
$Qreview->bindInt(':language_id', $osC_Language->getID());
$Qreview->bindInt(':language_id', $osC_Language->getID());
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid()) {
$Qreview->appendQuery('and p.products_id = :products_id');
$Qreview->bindInt(':products_id', $osC_Product->getID());
}
$Qreview->appendQuery('order by r.reviews_id desc limit :max_random_select_reviews');
$Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT);
$Qreview->executeRandomMulti();
if ($Qreview->numberOfRows()) {
$Qtext = $osC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id');
$Qtext->bindTable(':table_reviews', TABLE_REVIEWS);
$Qtext->bindInt(':reviews_id', $Qreview->valueInt('reviews_id'));
$Qtext->bindInt(':languages_id', $osC_Language->getID());
$Qtext->execute();
$data = array_merge($Qreview->toArray(), $Qtext->toArray());
$Qtext->freeResult();
$Qreview->freeResult();
}
$osC_Cache->write($data);
}
$this->_content = '';
if (empty($data)) {
if (isset($osC_Product) && is_a($osC_Product, 'osC_Product') && $osC_Product->isValid()) {
$this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $osC_Product->getKeyword()), osc_image(DIR_WS_IMAGES . 'box_write_review.gif', $osC_Language->get('button_write_review'))) . '</div>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $osC_Product->getKeyword()), $osC_Language->get('box_reviews_write')) . '<div style="clear: both;"></div>';
}
} else {
if (!empty($data['image'])) {
|
请发表评论