コード例 #1
0
                case 'PRODUCT_LIST_PRICE':
                    if (smn_not_null($listing['specials_new_products_price'])) {
                        $rowData[$col] = '"' . $listing['specials_new_products_price'] . '"';
                    } else {
                        $rowData[$col] = '"' . $listing['products_price'] . '"';
                    }
                    break;
                case 'PRODUCT_LIST_QUANTITY':
                    $rowData[$col] = '"' . $listing['products_quantity'] . '"';
                    break;
                case 'PRODUCT_LIST_WEIGHT':
                    $rowData[$col] = '"' . $listing['products_weight'] . '"';
                    break;
            }
        }
        $rowData[] = '"' . smn_get_products_description($listing['products_id'], $languages_id) . '"';
        $rowData[] = '"' . DIR_WS_IMAGES . $listing['products_image'] . '"';
        $rowData[] = '"' . $listing['products_id'] . '"';
        $rowData[] = '"' . $listing['store_id'] . '"';
        $storeData[] = '[' . implode(',', $rowData) . ']';
    }
}
?>
<div id="productListing"></div>
<div id="productListing_preview" style="padding-top:10px;"></div>
<textarea id="preview-tpl" style="display:none;">
    <div class="post-data">
     <table width="100%" cellpadding="0" cellspacing="0" border="0">
     <tr>
     <td><img src="{image}"></td>
     <td>{description}</td>
コード例 #2
0
$cat_name = $cat_name_fetch['categories_name'];
$info_box_contents = array();
if (!isset($featured_products_category_id) || $featured_products_category_id == '0') {
    $featured_products_query = smn_db_query("select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, p.store_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.store_id = '" . $store_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
} else {
    $featured_products_query = smn_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price, p.store_id from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.store_id = '" . $store_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
}
$count = 0;
while ($featured_products = smn_db_fetch_array($featured_products_query)) {
    if ($featured_products['specials_new_products_price']) {
        $whats_new_price = '<s>' . $currencies->display_price($featured_products['products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id'])) . '</s><br>';
        $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id'])) . '</span>';
    } else {
        $whats_new_price = $currencies->display_price($featured_products['products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id']));
    }
    $featured_products['products_description'] = smn_get_products_description($featured_products['products_id']);
    $featured_products['products_name'] = smn_get_products_name($featured_products['products_id']);
    $store_images = 'images/' . $featured_products['store_id'] . '_images/';
    ?>
    <td width="50%">
<?php 
    $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '">' . smn_image($store_images . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td><td><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '"></a></td><td align="center">' . $whats_new_price . '<br><br><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id'], 'NONSSL') . '">' . smn_image_button('button_buy_now.gif') . '</a>&nbsp;<br></td><tr><td colspan="3" align="top" valign="top" height="100">' . osc_trunc_string(strip_tags($featured_products['products_description'])) . '<br><br><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '">More Info...</a>');
    new infoBox($info_box_contents);
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'left', 'text' => ' ');
    new infoBoxDefault($info_box_contents, true, true);
    //echo '</td>';
    $count++;
    if ($count > 1) {
        $count = 0;
        echo '</tr><tr>';
コード例 #3
0
     $products_head_title_tag = $_POST['products_head_title_tag'];
     $products_head_desc_tag = $_POST['products_head_desc_tag'];
     $products_head_keywords_tag = $_POST['products_head_keywords_tag'];
 } else {
     $product_query = smn_db_query("select p.products_id, pd.language_id, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int) $_GET['pID'] . "'");
     $product = smn_db_fetch_array($product_query);
     $pInfo = new objectInfo($product);
     $products_image_name = $pInfo->products_image;
 }
 $form_action = isset($_GET['pID']) ? 'update_product' : 'insert_product';
 echo smn_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
 $languages = smn_get_languages();
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     if (isset($_GET['read']) && $_GET['read'] == 'only') {
         $pInfo->products_name = smn_get_products_name($pInfo->products_id, $languages[$i]['id']);
         $pInfo->products_description = smn_get_products_description($pInfo->products_id, $languages[$i]['id']);
         $pInfo->products_head_title_tag = smn_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
         $pInfo->products_head_desc_tag = smn_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
         $pInfo->products_head_keywords_tag = smn_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
         $pInfo->products_url = smn_get_products_url($pInfo->products_id, $languages[$i]['id']);
     } else {
         $pInfo->products_name = smn_db_prepare_input($products_name[$languages[$i]['id']]);
         $pInfo->products_description = smn_db_prepare_input($products_description[$languages[$i]['id']]);
         $pInfo->products_head_title_tag = smn_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
         $pInfo->products_head_desc_tag = smn_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
         $pInfo->products_head_keywords_tag = smn_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
         $pInfo->products_url = smn_db_prepare_input($products_url[$languages[$i]['id']]);
     }
     ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr>
コード例 #4
0
                        <td background="includes/classes/thema/<?php 
    echo SITE_THEMA;
    ?>
/infobox/background_main.gif" width="100%" class="infoBoxHeading"><?php 
    echo $default_specials['products_name'];
    ?>
                        </td>
                        <td class="infoBoxHeading" nowrap>
                        <img src="includes/classes/thema/<?php 
    echo SITE_THEMA;
    ?>
/infobox/corner_right_left.gif" border="0" ></td>
                      </tr>
                    </table>
<?php 
    $default_specials['products_description'] = smn_get_products_description($default_specials['products_id']);
    $default_specials['products_name'] = smn_get_products_name($default_specials['products_id']);
    $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id'] . '&ID=' . $default_specials['store_id']) . '">' . smn_image(DIR_WS_CATALOG_IMAGES . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td><td><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '"></a></td><td align="center"><s>' . $currencies->display_price($default_specials['products_price'], smn_get_tax_rate($default_specials['products_tax_class_id'], '', '', $default_specials['store_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($default_specials['specials_new_products_price'], smn_get_tax_rate($default_specials['products_tax_class_id'], '', '', $default_specials['store_id'])) . '</span><br><br><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $default_specials['products_id'], 'NONSSL') . '">' . smn_image_button('button_buy_now.gif') . '</a>&nbsp;<br></td><tr><td colspan="3" align="top" valign="top" height="100">' . osc_trunc_string(strip_tags($default_specials['products_description'])) . '<br><br><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">More Info...</a>
    ');
    new infoBox($info_box_contents);
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'left', 'text' => ' ');
    new infoBoxDefault($info_box_contents, true, true);
    $count++;
    if ($count > 1) {
        $count = 0;
        echo '</tr><tr>';
    }
}
?>
</tr></table></td></tr>
コード例 #5
0
      $products_head_desc_tag = $_POST['products_head_desc_tag'];
      $products_head_keywords_tag = $_POST['products_head_keywords_tag'];
    } else {
      $product_query = smn_db_query("select p.products_id, pd.language_id, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$_GET['pID'] . "'");
      $product = smn_db_fetch_array($product_query);
      $pInfo = $product;
      $products_image_name = $pInfo[products_image];
    }

    $form_action = (isset($_GET['pID'])) ? 'update_store_product' : 'insert_product';
    echo smn_draw_form($form_action, FILENAME_STORE_PRODUCT_CATEGORIES.'?ID='.$store_id.'&cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
    $languages = smn_get_languages();
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
      if (isset($_GET['read']) && ($_GET['read'] == 'only')) {
        $pInfo[products_name] = smn_get_products_name($pInfo[products_id], $languages[$i]['id']);
        $pInfo[products_description] = smn_get_products_description($pInfo[products_id], $languages[$i]['id']);
        $pInfo[products_head_title_tag] = $products_head_title_tag[$languages[$i]['id']];
        $pInfo[products_head_desc_tag]= $products_head_desc_tag[$languages[$i]['id']];
        $pInfo[products_head_keywords_tag] = $products_head_keywords_tag[$languages[$i]['id']];
        $pInfo[products_url] = smn_get_products_url($pInfo[products_id], $languages[$i]['id']);
      } else {
        $pInfo[products_name] = smn_db_prepare_input($products_name[$languages[$i]['id']]);
        $pInfo[products_description] = $products_description[$languages[$i]['id']];
        $pInfo[products_head_title_tag] = $products_head_title_tag[$languages[$i]['id']];
        $pInfo[products_head_desc_tag]= $products_head_desc_tag[$languages[$i]['id']];
        $pInfo[products_head_keywords_tag] = $products_head_keywords_tag[$languages[$i]['id']];
        $pInfo[products_url] = smn_db_prepare_input($products_url[$languages[$i]['id']]);
      } 
?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
コード例 #6
0
    $tabID = 'description-' . $languages[$i]['name'];
    $langTabPanel->addTab($tabID, smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name']);
    ob_start();
    ?>
 <table border="0" cellspacing="0" cellpadding="5" width="96%">
  <tr>
   <td class="main" valign="top"><?php 
    TEXT_PRODUCTS_DESCRIPTION;
    ?>
</td>
  </tr>
  <tr>
   <td><table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr>
     <td class="main" valign="top" width="100%"><?php 
    echo smn_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : smn_get_products_description($pInfo->products_id, $languages[$i]['id']));
    ?>
</td>
    </tr>
   </table></td>
  </tr>
  <tr>
   <td colspan="2" class="main"><hr><?php 
    echo TEXT_PRODUCT_METTA_INFO;
    ?>
</td>
  </tr>
  <tr>
   <td><?php 
    echo smn_draw_separator('pixel_trans.gif', '1', '10');
    ?>