Jump to content
xt:Commerce Community Forum

Yatego Export-Modul


smedder

Recommended Posts

Nachdem ich die ein oder andere Zeile auskommentiert bzw. ver?ndert habe, geht es. ;)

Vielen dank f?r deine M?he, das Modul zu machen.

Und die Funktion goe_get_products_categories_path funktioniert nicht (hab sie "ausgebaut"), ich wei? nicht, ob es an der 2er Version liegt und hab es mir nicht genauer angeguckt, ist mir aber auch nicht so wichtig, bin froh, dass ich die Produkte soweit unbeschadet zu Yatego bekommen habe.

Link to comment
Share on other sites

  • 7 months later...

Hallo,

habe XTC in der Version 3.04 SP1 im Einsatz undbin auch gerade auf der Suche nach einem Yatego Exportmodul. Habe das o.g Modul (http://php-boutique.blogspot.com/2005/08/k...rce-yatego.html) mal "angestestet", jedoch meine bestehenden u.g. php files (da neueres Datum: 21.10.2005) nicht angepasst.

Dies hat erwartungsgem?? zu Fehlermeldungenden gef?hrt (s.u.). Hat jemand bereits ein laufendes Yatego-Exportmodul im Einsatz auf Basis von 3.04 SP1???? F?r Feedback bin ich wie immer dankbar...!

Hier der entsprechende Code sowie Fehlermeldung im Adminmodul:

xtc_get_parent_categories.inc.php (vom 15.01.2005)


<?php

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

  $Id: xtc_get_parent_categories.inc.php,v 1.1 2003/09/06 21:47:50 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(general.php,v 1.225 2003/05/29); [url]www.oscommerce.com[/url] 

  (c) 2003 nextcommerce (xtc_get_parent_categories.inc.php,v 1.3 2003/08/13); [url]www.nextcommerce.org[/url]


  Released under the GNU General Public License 

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


// Recursively go through the categories and retreive all parent categories IDs

// TABLES: categories

 function xtc_get_parent_categories(&$categories, $categories_id) {

  $parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $categories_id . "'";

  $parent_categories_query = xtDBquery($parent_categories_query);

  while ($parent_categories = xtc_db_fetch_array(&$parent_categories_query,true)) {

   if ($parent_categories['parent_id'] == 0) return true;

   $categories[sizeof($categories)] = $parent_categories['parent_id'];

   if ($parent_categories['parent_id'] != $categories_id) {

    xtc_get_parent_categories($categories, $parent_categories['parent_id']);

   }

  }

 }

 ?>

und xtc_get_product_path.inc.php (vom 19.09.2005)

<?php

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

  $Id: xtc_get_product_path.inc.php,v 1.1 2003/09/06 21:47:50 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(general.php,v 1.225 2003/05/29); [url]www.oscommerce.com[/url]

  (c) 2003 nextcommerce (xtc_get_product_path.inc.php,v 1.3 2003/08/13); [url]www.nextcommerce.org[/url]


  Released under the GNU General Public License

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


// Construct a category path to the product

// TABLES: products_to_categories

// Bsp: Produkt-ID: 255 => 10_25_204

 require_once(DIR_FS_INC."xtc_get_parent_categories.inc.php");


 function xtc_get_product_path($products_id) {

  $cPath = '';


  $category_query = "select p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = '" . (int)$products_id . "' and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id != 0 limit 1";

  $category_query = xtDBquery($category_query);

  if (xtc_db_num_rows(&$category_query,true)) {

   $category = xtc_db_fetch_array($category_query);


   $categories = array();

   xtc_get_parent_categories($categories, $category['categories_id']);


   $categories = array_reverse($categories);


   $cPath = implode('_', $categories);


   if (xtc_not_null($cPath)) $cPath .= '_';

   $cPath .= $category['categories_id'];

  }


  return $cPath;

 }

 ?>

Und zuguter letzt die Fehlermeldung:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of xtc_db_num_rows(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /is/htdocs/wp1021893_K5E5YM2ULK/www/shop/admin/includes/modules/export/yatego.php on line 204

Link to comment
Share on other sites

Archived

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

×
  • Create New...