13,24c13 < // require('includes/application_top.php'); < chdir('semanticweb'); // configuration.php then rechanges directory to ".." < require('configuration.php'); < require('semanticweb/index.php'); < < 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 . "'"); < $product_check = tep_db_fetch_array($product_check_query); < ?> < '."\n\n"; --- > require('includes/application_top.php'); 26,38c15 < echo ''."\n"; < /* < >*/ < /** create < echo ''; < **/ --- > require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); 40,46c17,18 < $xmlns = ' $uri) { < if($ns != "base") < $xmlns .= "\n".' xmlns:'.$ns.'="'.$uri.'"'; < } < $xmlns .= ' xml:lang="'.$config['default_language_name'].'">'."\n\n"; < echo $xmlns; --- > $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 . "'"); > $product_check = tep_db_fetch_array($product_check_query); 47a20,21 > > > 49,55c23 < '; < /**/ < if(file_exists("semanticweb.rdf")): < ?> < < --- > 57c25 < --- > 69,73c37 < < < < < --- > 83,199c47 < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < '; < echo ''; < echo ''; < if($product_info['products_quantity']): < echo ''; < echo ''; < echo ''; < echo ''; < echo ''; < echo ''; < echo ''; < echo ''; < endif; < < if($product_info['products_url']): ?> < < < < '; < echo ''; < < ?> < --- >
224,235c72,73 < /* validfrom and validthrough for product offering */ < $validfrom = time();//max(array($product_info['products_date_available'], $product_info['products_date_added'])); < $offering_validfrom = $format->w3cdate($validfrom); < < $offering_validity = tep_db_query("select t2.definition_value from ".TABLE_SEMANTICWEB_DEFINITION." t1, ".TABLE_SEMANTICWEB_DEFINITION_VALUES." t2 where t1.definition_id=t2.definition_id and t1.definition_name='OfferingValidity'"); < if($offering_validity = tep_db_fetch_array($offering_validity)) { < $offset_in_days = $offering_validity['definition_value']; < if($offset_in_days > 0) { < $offering_validthrough = $format->w3cdate($validfrom, $offset_in_days); < } < else $offering_validthrough = $format->w3cdate($validfrom, 1); < } --- > $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id 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 . "'"); > $product_info = tep_db_fetch_array($product_info_query); 238,315c76,80 < < /* get special price's validfrom and validthrough */ < $specials = "select specials_new_products_price as price, specials_date_added as validfrom, expires_date as validthrough, status from ".TABLE_SPECIALS." where products_id='".$HTTP_GET_VARS['products_id']."'"; < $specials = tep_db_query($specials); < if($specials_values = tep_db_fetch_array($specials)) { // if can be used, because at most 1 special per offer < < if($specials_values['validthrough'] == "0000-00-00 00:00:00") < $specials_values['validthrough'] = NULL; < < $offset = 1; // default offset value of 1 < /* calculate the validthrough element */ < if($specials_values['validfrom'] != NULL && $specials_values['validthrough'] == NULL) { // validthrough is not set? - fetch it from the master configuration < $special_validity = tep_db_query("select t2.definition_value from ".TABLE_SEMANTICWEB_DEFINITION." t1, ".TABLE_SEMANTICWEB_DEFINITION_VALUES." t2 where t1.definition_id=t2.definition_id and t1.definition_name='SpecialValidity'"); < if($special_validity = tep_db_fetch_array($special_validity)) { < if($special_validity['definition_value'] > 0) // validthrough must at least be 1 day after validfrom! < $offset = $special_validity['definition_value']; < } < } < < if(!isset($specials_values['validthrough']) || empty($specials_values['validthrough'])) < $specials_values['validthrough'] = $format->w3cdate(strtotime($specials_values['validfrom']), $offset); < else // e.g. valid through 1.1.2009, means valid through 1.1.2009 the whole day long --> shift by 1 day < $specials_values['validthrough'] = $format->w3cdate(strtotime($specials_values['validthrough']), 1); < < if($specials_values['status']) {// && (empty($offset) || $specials_values['validthrough']>$format->w3cdate(time()))) { /* check, if product special is online, and if it is valid */ < if ($new_price = $specials_values['price']) { < // normal price < $products_price = ''; < $products_price .= ''; < $products_price .= '' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; < $products_price .= ''; < $products_price .= ''; < $products_price .= ''; < // shall we display validfrom < if(!empty($offering_validfrom)) < $products_price .= ''; < // shall we display validthrough (only, if validfrom is set) < if(!empty($offering_validfrom) && !empty($offering_validthrough)) < $products_price .= ''; < $products_price .= ' '; < < // special price < $products_price .= ''; < $products_price .= ''; < $products_price .= '' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; < $products_price .= ''; < $products_price .= ''; < $products_price .= ''; < $products_price .= ''; < $products_price .= ''; < // shall we display validfrom < if(!empty($specials_values['validfrom'])) { < $products_price .= ''; < // shall we display validthrough (only, if validfrom is set) < //if(!empty($specials_values['validfrom']) && $specials_values['validthrough']>$format->w3cdate(time())) < $products_price .= ''; < } < $products_price .= ''; < } < < } < } < < if(empty($new_price)) { < /* no special price available for this product */ < $products_price = ''; < $products_price .= ''; < $products_price .= '' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ''; < $products_price .= ''; < $products_price .= ''; < $products_price .= ''; < // shall we display validfrom < if(!empty($offering_validfrom)) < $products_price .= ''; < // shall we display validthrough (only, if validfrom is set) < if(!empty($offering_validfrom) && !empty($offering_validthrough)) < $products_price .= ''; < $products_price .= ''; --- > > if ($new_price = tep_get_products_special_price($product_info['products_id'])) { > $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'])) . ''; > } else { > $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); 323d87 < 326c90 <
--- >
328,363c92,93 < < --- > > 371c101 <
"> < < < < < $upper) { < switch($element) { < case 'BusinessFunction': < create_properties_rdfa('has'.$element, $upper); < break; < case 'PaymentMethod': < create_properties_rdfa('accepted'.$element.'s', $upper); < break; < case 'DeliveryMethod': < create_properties_rdfa('available'.$element.'s', $upper); < break; < case 'BusinessEntityType': < create_properties_rdfa('eligibleCustomerTypes', $upper); < break; < case 'eligibleRegions': < create_properties_rdfa($element, $upper, false); < } < } < for($i=0; $i < < < --- > 389d118 < /* (full) product description */ 391,404c120 <

< < < < < < < "> < < < < < --- >