Jump to content
xt:Commerce Community Forum

Artikel-Nr unter new_products_***.html anzeigen


BJS1977

Recommended Posts

Hallo zusammen!

Wie kann man die Artikelnummer utner new_products_***.html anzeigen lassen?

Habe zwar schon was versucht und in der new_products.php was eingef?gt

<?php

/* -----------------------------------------------------------------------------------------

  $Id: new_products.php,v 1.22 2004/04/26 10:31:17 fanta2k Exp $


  XT-Commerce - community made shopping

  http://www.xt-commerce.com


  Copyright (c) 2003 XT-Commerce

  -----------------------------------------------------------------------------------------

  based on: 

  (c) 2000-2001 The Exchange Project (earlier name of osCommerce)

  (c) 2002-2003 osCommerce(new_products.php,v 1.33 2003/02/12); [url]www.oscommerce.com[/url]

  (c) 2003 nextcommerce (new_products.php,v 1.9 2003/08/17); [url]www.nextcommerce.org[/url]


  Released under the GNU General Public License 

  -----------------------------------------------------------------------------------------

  Third Party contributions:

  Enable_Disable_Categories 1.3    	Autor: Mikel Williams | [email][email protected][/email]


  Released under the GNU General Public License

  ---------------------------------------------------------------------------------------*/

$module_smarty= new Smarty;

$module_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');

 require_once(DIR_FS_INC . 'xtc_get_products_name.inc.php');

 require_once(DIR_FS_INC . 'xtc_get_short_description.inc.php');

 require_once(DIR_FS_INC . 'xtc_get_products_price.inc.php');

 require_once(DIR_FS_INC . 'xtc_image_button.inc.php');

 require_once(DIR_FS_INC . 'xtc_get_all_get_params.inc.php');

 require_once(DIR_FS_INC . 'xtc_get_products_attribute_price.inc.php');


 //fsk18 lock

 $fsk_lock='';

 if ($_SESSION['customers_status']['customers_fsk18_display']=='0') {

 $fsk_lock=' and p.products_fsk18!=1';

 }

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

  if (GROUP_CHECK=='true') {

  $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";

 }

  $new_products_query = xtc_db_query("select distinct p.products_fsk18,

                     p.products_id,

      p.products_model,

                     p.products_image,

                     p.products_tax_class_id,

                     IF(s.status, s.specials_new_products_price, p.products_price) as products_price

                     from " . TABLE_PRODUCTS . " p

                     left join " . TABLE_SPECIALS . " s

                     on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c,

                     " . TABLE_CATEGORIES . " c

                     where c.categories_status='1' and

                     p.products_id = p2c.products_id and

                     p2c.categories_id = '0' ".$fsk_lock."

                     ".$group_check."

                     and p.products_status = '1'

                     order by p.products_date_added

                     DESC limit " . MAX_DISPLAY_NEW_PRODUCTS);

 } else {

  if (GROUP_CHECK=='true') {

  $group_check="and p.group_ids LIKE '%c_".$_SESSION['customers_status']['customers_status_id']."_group%'";

 }

  $new_products_query = xtc_db_query("select distinct p.products_fsk18,

                    p.products_id,

     p.products_model,

                    p.products_image,

                    p.products_tax_class_id,

                    IF(s.status, s.specials_new_products_price, p.products_price) as

                    products_price from " . TABLE_PRODUCTS . " p left join

                    " . TABLE_SPECIALS . " s on p.products_id = s.products_id,

                    " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c

                    where c.categories_status='1'

                    and p.products_id = p2c.products_id

                    and p2c.categories_id = c.categories_id

                    ".$group_check."

                    and c.parent_id = '" . $new_products_category_id . "'

                    and p.products_status = '1' ".$fsk_lock."

                    order by p.products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS);

 }

 $row = 0;

 $module_content = array();

 while ($new_products = xtc_db_fetch_array($new_products_query)) {

  $new_products['products_name'] = xtc_get_products_name($new_products['products_id']);

	$new_products['products_short_description'] = xtc_get_short_description($new_products['products_id']);

  if ($_SESSION['customers_status']['customers_status_show_price']!='0') {

  $buy_now='';

  if ($_SESSION['customers_status']['customers_fsk18']=='1') {

    if ($new_products['products_fsk18']=='0') $buy_now='<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $new_products['products_id'], 'NONSSL') . '">' . xtc_image_button('button_buy_now.gif', TEXT_BUY . $new_products['products_name'] . TEXT_NOW);

  } else {

    $buy_now='<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $new_products['products_id'], 'NONSSL') . '">' . xtc_image_button('button_buy_now.gif', TEXT_BUY . $new_products['products_name'] . TEXT_NOW);

  }

  $image='';

  if ($new_products['products_image']!='') {

  $image=DIR_WS_THUMBNAIL_IMAGES . $new_products['products_image'];

  }

  $module_content[]=array(

              'PRODUCTS_NAME' => $new_products['products_name'],

   	'PRODUCTS_MODEL' => $new_products['products_model'],

              'PRODUCTS_DESCRIPTION' => $new_products['products_short_description'],

              'PRODUCTS_PRICE' => xtc_get_products_price($new_products['products_id'],$price_special=1,$quantity=1),

              'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']),

              'PRODUCTS_IMAGE' => $image,

              'BUTTON_BUY_NOW'=>$buy_now);


  } else {


  $image='';

  if ($new_products['products_image']!='') {

  $image=DIR_WS_THUMBNAIL_IMAGES . $new_products['products_image'];

  }

	$module_content[]=array(

   	'PRODUCTS_NAME' => $new_products['products_name'],

   	'PRODUCTS_MODEL' => $new_products['products_model'],

   	'PRODUCTS_DESCRIPTION' => $new_products['products_short_description'],

   	'PRODUCTS_PRICE' => xtc_get_products_price($new_products['products_id'],$price_special=1,$quantity=1),

   	'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']),

   	'PRODUCTS_IMAGE' => $image);

 }

  $row ++;


 }

  if (sizeof($module_content)>=1)

  {

 $module_smarty->assign('language', $_SESSION['language']);

 $module_smarty->assign('module_content',$module_content);

 // set cache ID

 if (USE_CACHE=='false') {

 $module_smarty->caching = 0;

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

 $module= $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html');

 } else {

 $module= $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html');

 }

 } else {

 $module_smarty->caching = 1;

 $module_smarty->cache_lifetime=CACHE_LIFETIME;

 $module_smarty->cache_modified_check=CACHE_CHECK;

 $cache_id = $new_products_category_id.$_SESSION['language'].$_SESSION['customers_status']['customers_status_name'].$_SESSION['currency'];

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

 $module= $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html',$cache_id);

 } else {

 $module= $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html',$cache_id);

 }

 }

 $default_smarty->assign('MODULE_new_products',$module);

 }



?>
Dieses habe ich bereits eingef?gt an verschienden stellen p.products_model, 'PRODUCTS_MODEL' => $new_products['products_model'], Was muss ich sonst noch einf?gen, damit die Artikelnummer auch dort angezeigt wird? Muss ich da noch zu einer anderen php-datei ne Bezeihung herstellen wie z.B. hier

 $new_products['products_name'] = xtc_get_products_name($new_products['products_id']);

	$new_products['products_short_description'] = xtc_get_short_description($new_products['products_id']);

  if ($_SESSION['customers_status']['customers_status_show_price']!='0') 

Ich bin ja schon am suchen, aber ich find nicht raus welche xtc_get_ ... ich nehmen m?sste.

W?re cool wenn jemand mir helfen k?nnte.

Danke

mfg

BJS

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...