Hallo Community,
ob es nun ein Bugfix, Update, Feature oder Modul ist, wird sich noch heraus stellen, daher nenne ich es vorerst Anleitung.
Es geht um das Duplizieren (nicht Verlinken) von Produkten mit eigenem Content aus dem Content-Manager. Dies nutzt ein Kunde in seinem Shop sehr intensiv, nun ist aufgefallen das dieser beim Duplizieren von Produkten vernachlässigt wird. Bisher habe ich nur Beiträge zum Duplizieren von Attributen (vor v1.06) gefunden, daher hier eine kurze Anleitung wie ich das Ganze eingebaut habe:
Datei:
/lang/german/admin/categories.phpSuche nach Zeile
define('TEXT_ATTRIBUTE_COPY_INFO', 'Artikelattribute mitkopieren<br/ >Nur bei Einzelkopie (1 Artikel) empfohlen'); Füge NACH DIESER ZEILE ein
// BOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products contentdefine('TEXT_CONTENT_COPY', 'Artikel-Content mitkopieren');define('TEXT_CONTENT_COPY_INFO', 'Artikel-Content mitkopieren<br/ >Nur bei Einzelkopie (1 Artikel) empfohlen');// EOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products content Datei
/admin/includes/classes/categories.phpSuche nach Zeile
} //duplicate_product ends
Füge VOR DIESER ZEILE ein:
// BOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products contentif (isset($_POST['cnt_copy']) && $_POST['cnt_copy'] == 'cnt_copy') { $content_copy_stmt = 'SELECT * ' . 'FROM ' . TABLE_PRODUCTS_CONTENT
. ' ' . 'WHERE products_id = ' . $old_products_id; $content_copy_query = xtc_db_query
($content_copy_stmt); while ($content_copy_data = xtc_db_fetch_array
($content_copy_query)) { $sql_data_array = $content_copy_data; //set attributes data (overrides) unset($sql_data_array['content_id']); $sql_data_array['products_id'] = $dup_products_id; //write attributes data to DB xtc_db_perform
(TABLE_PRODUCTS_CONTENT
, $sql_data_array); }}// EOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products content Datei
/admin/includes/modules/categories_view.phpSuche nach Zeile
$contents[] = array('text' => '<strong>' . TEXT_ATTRIBUTE_COPY
. '</strong><br />' . '<input type="checkbox" name="attr_copy" value="attr_copy"><font size="1">'.TEXT_ATTRIBUTE_COPY_INFO
.'</font><br /><hr noshade>'); Füge NACH DIESER ZEILE ein
// BOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products content$contents[] = array('text' => '<strong>' . TEXT_CONTENT_COPY
. '</strong><br />' . '<input type="checkbox" name="cnt_copy" value="cnt_copy"><font size="1">'.TEXT_CONTENT_COPY_INFO
.'</font><br /><hr noshade>');// EOF - Timo Paul (mail[at]timopaul[dot]biz) - 2014-01-13 - duplicate products content Fertig.
Hoffe damit Jemandem geholfen haben zu können.
Besten Gruß,
Timo
Linkback: https://www.modified-shop.org/forum/index.php?topic=28916.0