set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } # Fine */ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); //$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); // BOF Enable & Disable Categories $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF Enable & Disable Categories $product_check = tep_db_fetch_array($product_check_query); // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } // EOF Separate Pricing per Customer /* previous product */ $user_from_pos = strpos($_SERVER['HTTP_REFERER'], "product_info.php"); if($user_from_pos === false){ $pre_button = ""; }else{ $pre_button = "" . tep_image_button('button_prev_product.gif') . ""; } /* next product, order by product id */ $next_product_category_query = "select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"; $next_product_category_result = tep_db_query($next_product_category_query); $next_product_category_array = tep_db_fetch_array($next_product_category_result); $next_product_category = $next_product_category_array['categories_id']; $next_product_query = "select products.products_id from " . TABLE_PRODUCTS . " , " . TABLE_PRODUCTS_TO_CATEGORIES . " where products.products_status = '1' and products.products_id > '" . (int)$HTTP_GET_VARS['products_id'] . "' and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = $next_product_category"; $next_product_result = tep_db_query($next_product_query); $next_product_array = tep_db_fetch_array($next_product_result); if($next_product_array['products_id'] > 0){ $next_product_id = $next_product_array['products_id']; $next_button = '' . tep_image_button('button_next_product.gif', IMAGE_BUTTON_NEXT_PROD) . ''; }else{ $next_button = ''; } $product_meta['products_description'] = substr(strip_tags($product_meta['products_description']), 0, 200); // begin recently_viewed // Creates/updates a session variable -- a string of products IDs separated by commas // IDs are in order newest -> oldest $recently_viewed_string = ''; if ($product_check['total'] > 0) { //We don't want to add products that don't exist/are not available if (!tep_session_is_registered('recently_viewed')) { tep_session_register('recently_viewed'); } else { $recently_viewed_string = $_SESSION['recently_viewed']; } // Deal with sessions created by the previous version if (substr_count ($recently_viewed_string, ';') > 0) { $_SESSION['recently_viewed'] = ''; $recently_viewed_string = ''; } // We only want a product to display once, so check that the product is not already in the session variable $products_id = (int) $_GET['products_id']; if ($recently_viewed_string == '') { // No other products $recently_viewed_string = (string) $products_id; // So set the variable to the current products ID } else { $recently_viewed_array = explode (',', $recently_viewed_string); if (!in_array ($products_id, $recently_viewed_array) ) { $recently_viewed_string = $products_id . ',' . $recently_viewed_string; //Add the products ID to the beginning of the variable } } $_SESSION['recently_viewed'] = $recently_viewed_string; } //if ($product_check['total'] // end recently_viewed ?> > <?php echo $titletag; ?>
0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $retailPrice = $product_info['products_price']; $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $products_price = '' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; $products_price = '' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; $products_price .= (isset($retailPrice)) ? '
Prezzo consigliato al pubblico: '.$currencies->display_price($retailPrice, tep_get_tax_rate($product_info['products_tax_class_id'])).'
' : '' ; $products_price .= '' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; } else { // BOF Separate Pricing per Customer if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $retailPrice = $product_info['products_price']; $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); $products_price .= (isset($retailPrice)) ? '
(Prezzo consigliato al pubblico: '.$currencies->display_price($retailPrice, tep_get_tax_rate($product_info['products_tax_class_id'])).')
' : ''; } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '
['. TEXT_PRODUCT_CODE . ' ' . $product_info['products_model'] . ']'; } else { $products_name = $product_info['products_name']; } ?> "; $show = 1; if($product_info['products_restriction']){ if(tep_session_is_registered('customer_id')){ if($data < $_SESSION['customer_dob']){ $error_restriction = 'non hai raggiunto la maggior età'; $show = 0; } } else { $error_restriction = 'non sei loggato o non hai raggiunto la maggior età'; $show = 0; } } if($show == 1){ //EOF Product restriction ?> 0) { ?> date('Y-m-d H:i:s')) { ?>
TEXT_PRODUCT_NOT_FOUND))); ?>
' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ''; ?>
' . tep_image(DIR_WS_IMAGES . $small_image, $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '
' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . ''; ?>
0) { ?> $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?>
 
' . $products_name . ''; // Display out of stock message if ((STOCK_CHECK == 'true')&&($product_info['products_quantity'] < 1)) { echo '
' . TEXT_OUT_STOCK . ''; } ?>
 
 
0 && !$specialprice){ $discountplus_query = tep_db_query("select quantity, value, valuetyp from " . TABLE_DISCOUNTPLUS . " where products_id = '" . $product_info['products_id'] . "' order by quantity "); if (tep_db_num_rows($discountplus_query) > 0) { ?>

0) { ?>
           
    display_price($discountplus_data['value'], tep_get_tax_rate($product_info['products_tax_class_id'])); elseif ($discountplus_data['valuetyp'] == "endprice") $discountplus_rabatt = "->"; else $discountplus_rabatt = ($discountplus_data['value']+0)."%"; echo $discountplus_rabatt; ?>    display_price($discountplus_price, tep_get_tax_rate($product_info['products_tax_class_id'])); echo $discountplus_price_output; ?>
 
"; //echo "STOCK_ALLOW_CHECKOUT".STOCK_ALLOW_CHECKOUT."
"; if (((STOCK_CHECK == "true")&&($product_info['products_quantity'] > 0)) or (STOCK_ALLOW_CHECKOUT == "true")) { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart1.gif', IMAGE_BUTTON_IN_CART); } else { echo tep_image_button('button_out_of_stock.gif', IMAGE_BUTTON_OUT_OF_STOCK); //echo tep_draw_separator('pixel_trans.gif', '1', '22'); } ?> 0) { echo '' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . ''/* . TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']*/; } else { echo '' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . ''; } ///// SID-KILLER ( ex-change ) //////////////////////////// // ORG: // echo '' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . ''; ///// SID-KILLER ( ex-change ) eof //////////////////////// ?> display_template_output) { include(DIR_WS_BOXES . 'sts_product_print.php'); } else { echo '' . tep_image_button('button_product_print.gif', IMAGE_BUTTON_PRODUCT_PRINT) . ''; } ?>

' . HEADER_TITLE_PRODUCTS_DESC . ''; ?>
0) { $free_product = tep_db_fetch_array($get_1_free_query); echo '

' . sprintf (TEXT_GET_1_FREE_PROMOTION, $free_product['products_qualify_quantity'], $product_info['products_name'], $free_product['products_free_quantity'], $free_product['products_name'], $free_product['products_multiple']) . '

'; } // end Get 1 Free ?>
"; $bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price, p.products_image FROM products p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id=pd.products_id INNER JOIN " . TABLE_PRODUCTS_BUNDLES . " pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = " . $HTTP_GET_VARS['products_id'] . " and language_id = '" . (int)$languages_id . "'"); while ($bundle_data = tep_db_fetch_array($bundle_query)) { if ($bundle_data['products_bundle'] == "yes") { // uncomment the following line to display subproduct qty echo "
» " . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . ""; echo "
» " . $bundle_data['products_name'] . ""; $bundle_query_nested = tep_db_query("SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price FROM products p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id=pd.products_id INNER JOIN " . TABLE_PRODUCTS_BUNDLES . " pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = " . $bundle_data['products_id'] . " and language_id = '" . (int)$languages_id . "'"); /* $bundle_query_nested = tep_db_query("select pb.subproduct_id, pb.subproduct_qty, p.products_model, p.products_quantity, p.products_bundle, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS_BUNDLES . " pb LEFT JOIN " . TABLE_PRODUCTS . " p ON p.products_id=pb.subproduct_id where pb.bundle_id = '" . $bundle_data['subproduct_id'] . "'"); */ while ($bundle_data_nested = tep_db_fetch_array($bundle_query_nested)) { // uncomment the following line to display subproduct qty echo "
     " . $bundle_data_nested['subproduct_qty'] . " x " . $bundle_data_nested['products_name'] . ""; echo "
     " . $bundle_data_nested['products_name'] . ""; $bundle_sum += $bundle_data_nested['products_price']*$bundle_data_nested['subproduct_qty']; } } else { // uncomment the following line to display subproduct qty echo ""; // echo "
» " . $bundle_data['products_name'] . ""; $bundle_sum += $bundle_data['products_price']*$bundle_data['subproduct_qty']; } } $bundle_saving = $bundle_sum - $product_info['products_price']; $bundle_sum = $currencies->display_price($bundle_sum, tep_get_tax_rate($product_info['products_tax_class_id'])); $bundle_saving = $currencies->display_price($bundle_saving, tep_get_tax_rate($product_info['products_tax_class_id'])); // comment out the following line to hide the "saving" text echo "
" ; echo '' . tep_image(DIR_WS_IMAGES . $bundle_data['products_image'], $bundle_data['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '' ; echo "» " . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . '     ' . $currencies->display_price($bundle_data['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . "

" . TEXT_RATE_COSTS . ' ' . $bundle_sum . '

' . TEXT_IT_SAVE . ' ' . $bundle_saving . ''; } ?>
ATTENZIONE: Questo prodotto è destinato ad un pubblico adulto. Non può essere visualizzato in quanto
if ( (USE_CACHE == 'true') && !SID) { echo tep_cache_xsell_products(3600); echo '
'; //*** echo tep_cache_also_purchased(3600); } else { //*** include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); echo '
'; include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); //***
} ?>