Hallo,
momentan zeigt meine Startseite einen TExt an "Guten Abend, ... wollen Sie anmelden.." etc.
Ich möchte hier jedoch gleich in der Mitte die ganzen Kategorien angezeigt bekommen.
Die STartseite soll also so aussehen, wie wenn ich hier (http://demo.myoos.de/Wein-c-4.html) in Wein drinnen bin, seh ich gleich "Frankreich, Weißwein und Roséwein" und wenn ich auf der STartseite bin, soll dann halt in der Mitte gleich "Rabatt, Wein und Cross Selling" stehen.
Wird sicher mit kleinen Änderungen möglich sein?
Gruß Maw
[1.6.4] Startseite soll gleich Kategorien anzeigen
Hallo,
Und welche Version verwendest du? Verfügt diese bereits über die Event Plugins?
Bitte bei zukünftigen Fragen die Version in den Titel des Themas aufnehmen...
Wie lautet der cPath nach
inde.php?mp=main&file=shop&cPath=
oder bei Suchemachinen freundlichen Links die Zahl vor dot html
ich frage ja nur...
cu
ralf
Und welche Version verwendest du? Verfügt diese bereits über die Event Plugins?
Bitte bei zukünftigen Fragen die Version in den Titel des Themas aufnehmen...
Wie lautet der cPath nach
inde.php?mp=main&file=shop&cPath=
oder bei Suchemachinen freundlichen Links die Zahl vor dot html
ich frage ja nur...
cu
ralf
Es gibt unterschiedliche Möglichkeiten und Wege, wie man dies macht.die Frage mit dem Cpath versteh ich leider nicht ganz. Klar jede KAtegorie hat einen cpath (z.B. &cPath=10& oder &cPath=33&), aber auf der Seite, wo diese Änderung stattfinden soll, lautet die URL folgendermaßen: index.php?mp=main&file=main
Zuerst sollte man ein Gefühl für cPath bekommen. Ergo eben Suchmachinen freundliche Links deaktivieren und
sich cPath ansehen.
http://localhost/oos16/shop/index.php?mp=m...mp;cPath=0&
Der Shop sollte in der Mitte nun so aussehen, wie gewünscht. Nur leider ist der Kategorie Block etwas 'schrottig'
Damit wir auf cPath = 0 bei
http://localhost/oos16/shop/index.php?mp=m...mp;cPath=0& in der URL verzichten können.
Ändern wir
~/shop/includes/pages/main/shop.php
$category_depth = 'top'
nach
$category_depth = 'nested';
in Zeile 30
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> include OOS_LANGUAGES . $sLanguage . '/' . $sMp . '_' . $sFile . '.php';
include OOS_FUNCTIONS . 'function_default.php';
// the following cPath references come from oos_main.php
$category_depth = 'nested';<!--c2-->[/align]<!--ec2-->
rufen den Shop nun ohne cPath auf.
http://localhost/oos16/shop/index.php?mp=main&file=shop
Der Shop sollte nun so aussehen, wie er auf der späteren Startseite gewünscht ist.
Dafür ändern wir in dem Script eben noch
Zeile 513
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> } else {
// $category_depth = 'top';
oos_redirect(oos_link($aModules['main], $aFilename['main_main]));
}<!--c2-->[/align]<!--ec2-->
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> } else {
exit;
}<!--c2-->[/align]<!--ec2-->
in der
~/shop/includes/oos_filename.php
ändern wir
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> $aFilename['main_main] = $prefix_filename . 'shop';<!--c2-->[/align]<!--ec2-->
bye
r23
Hallo,
da dein Shop schon etwas länger online ist, werden vermutlich einige User
Links auf index.php&mp=main&file=main
haben... evtl. auch Google
site:www.domain.at Indizierte Seiten vom Shop bei Google
Ich würde daher noch die
~/shop/includes/page/main/main.php
mit
~/shop/includes/page/main/shop.php
austauschen
und
~/shop/includes/langauges/*je sprache*/main_main.php
mit
~/shop/includes/langauges/*je sprache*/main_shop.php
Wenn du doch noch deine
"Sonderangebote"
"Produkt Empfehleungen "
usw. von der Startseite (Home)
haben möchtest
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> if ($category_depth == 'nested') {
$aOption['template_main] = $sTheme . '/system/nested.html';
$aOption['page_heading] = $sTheme . '/system/nested_heading.html';
$nPageType = OOS_PAGE_TYPE_CATALOG;
$sGroup = trim($_SESSION['member]->group['text]);
$contents_cache_id = $sTheme . '|shop|nested|' . intval($nCurrentCategoryId) . '|' . $cPath . '|' . $sGroup . '|' . $sLanguage;
include OOS_INCLUDES . 'oos_system.php';
if (!isset($option)) {
include OOS_INCLUDES . 'info_message.php';
include OOS_INCLUDES . 'oos_blocks.php';
include OOS_INCLUDES . 'oos_counter.php';
}
if ( (USE_CACHE == 'true') && (!SID) ) {
$smarty->caching = 2;
$smarty->cache_lifetime = 8 * 24 * 3600;
}
$smarty->assign('oos_breadcrumb', $oBreadcrumb->trail(BREADCRUMB_SEPARATOR));
if (!$smarty->is_cached($aOption['template_main], $contents_cache_id)) {
$sql = "SELECT cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_id = '" . intval($nCurrentCategoryId) . "'
AND cd.categories_id = '" . intval($nCurrentCategoryId) . "'
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'";
$category_result = $db->Execute($sql);
$category = $category_result->fields;
if (isset($cPath) && ereg('_', $cPath)) {
// check to see if there are deeper categories within the current category
$category_links = array_reverse($aCategoryPath);
for($i=0, $n=count($category_links); $i<$n; $i++) {
$sql = "SELECT c.categories_id, c.categories_image, c.parent_id, c.categories_status, cd.categories_name
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_status = '1'
AND c.parent_id = '" . intval($category_links[$i]) . "'
AND c.categories_id = cd.categories_id
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'
ORDER BY c.sort_order, cd.categories_name";
$categories_result = $db->Execute($sql);
if ($categories_result->RecordCount() < 1) {
// do nothing, go through the loop
} else {
break; // we've found the deepest category the customer is in
}
}
} else {
$sql = "SELECT c.categories_id, cd.categories_name, cd.categories_description,
c.categories_image, c.parent_id, c.categories_status
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_status = '1'
AND c.parent_id = '" . intval($nCurrentCategoryId) . "'
AND c.categories_id = cd.categories_id
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'
ORDER BY c.sort_order, cd.categories_name";
$categories_result = $db->Execute($sql);
}
$rows = 0;
$categories_box = '';
while ($categories = $categories_result->fields) {
$rows++;
$cPath_new = oos_get_path($categories['categories_id]);
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
$categories_box .= ' <td align="center" class="smallText" style="width: ' . $width . '" valign="top"><a href="' . oos_link($aModules['main], $aFilename['shop], $cPath_new) . '">';
if (oos_is_not_null($categories['categories_image])) {
$categories_box .= oos_image(OOS_IMAGES . $categories['categories_image], $categories['categories_name], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '
';
} else {
$categories_box .= oos_image(OOS_IMAGES . 'trans.gif', $categories['categories_name], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT, 'style="border: 3px double black"') . '
';
}
$categories_box .= $categories['categories_name] . '</a></td>' . "\n";
if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $categories_result->RecordCount())) {
$categories_box .= ' </tr>' . "\n";
$categories_box .= ' <tr>' . "\n";
}
$categories_result->MoveNext();
}
$new_products_category_id = $nCurrentCategoryId;
include OOS_MODULES . 'new_products.php';
if ( (ALLOW_CATEGORY_DESCRIPTIONS == 'true') && (oos_is_not_null($category['categories_heading_title])) ) {
$smarty->assign('oos_heading_title', $category['categories_heading_title]);
} else {
$smarty->assign('oos_heading_title', $aLang['heading_title]);
}
$smarty->assign(
array(
'category' => $category,
'categories_box' => $categories_box
)
);
}
$smarty->assign('oosPageHeading', $smarty->fetch($aOption['page_heading], $contents_cache_id));
$smarty->assign('contents', $smarty->fetch($aOption['template_main], $contents_cache_id));
$smarty->caching = false;
}<!--c2-->[/align]<!--ec2-->
um die Moduel der 'main' erweitern.
Der Aufbau einer Seite (Page) ist immer gleich
Du erweiterst zuerst die die Templates in $sOption
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1-->
$aOption['new_news] = $sTheme . '/modules/news/new_news.html';
if ($oEvent->installed_plugin('spezials')) $aOption['new_spezials] = $sTheme . '/modules/products/new_spezials.html';
if ($oEvent->installed_plugin('featured')) $aOption['featured] = $sTheme . '/modules/products/featured.html';
$aOption['upcoming_products] = $sTheme . '/modules/products/upcoming_products.html';<!--c2-->[/align]<!--ec2-->
um das Modul, was du haben möchtest.
Und fügst du anschliessend das Modul ein
z.B. Die 'wichtigsten Produkte' in dem Shop.
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> if ($oEvent->installed_plugin('featured')) {
if (!$smarty->is_cached($aOption['featured], $oos_modules_cache_id)) {
include OOS_MODULES . 'featured.php';
}
$smarty->assign('featured', $smarty->fetch($aOption['featured], $oos_modules_cache_id));
}<!--c2-->[/align]<!--ec2-->
Im Template
fügst du nur noch die Anzeige ein...
{$featured}
{$new_news}
{$new_spezials}
{$new_products}
{$upcoming_products}
Dies ist die Leistungsfähigkeit von unserem Projekt mach dies mal mit einem
anderen Shop
Und wenn man dies mit den Modulen 'kappiert' hat... kann man diese überall veröffentlichen
cu
ralf
eigentlich ganz logisch
da dein Shop schon etwas länger online ist, werden vermutlich einige User
Links auf index.php&mp=main&file=main
haben... evtl. auch Google
site:www.domain.at Indizierte Seiten vom Shop bei Google
Ich würde daher noch die
~/shop/includes/page/main/main.php
mit
~/shop/includes/page/main/shop.php
austauschen
und
~/shop/includes/langauges/*je sprache*/main_main.php
mit
~/shop/includes/langauges/*je sprache*/main_shop.php
Wenn du doch noch deine
"Sonderangebote"
"Produkt Empfehleungen "
usw. von der Startseite (Home)
haben möchtest
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> if ($category_depth == 'nested') {
$aOption['template_main] = $sTheme . '/system/nested.html';
$aOption['page_heading] = $sTheme . '/system/nested_heading.html';
$nPageType = OOS_PAGE_TYPE_CATALOG;
$sGroup = trim($_SESSION['member]->group['text]);
$contents_cache_id = $sTheme . '|shop|nested|' . intval($nCurrentCategoryId) . '|' . $cPath . '|' . $sGroup . '|' . $sLanguage;
include OOS_INCLUDES . 'oos_system.php';
if (!isset($option)) {
include OOS_INCLUDES . 'info_message.php';
include OOS_INCLUDES . 'oos_blocks.php';
include OOS_INCLUDES . 'oos_counter.php';
}
if ( (USE_CACHE == 'true') && (!SID) ) {
$smarty->caching = 2;
$smarty->cache_lifetime = 8 * 24 * 3600;
}
$smarty->assign('oos_breadcrumb', $oBreadcrumb->trail(BREADCRUMB_SEPARATOR));
if (!$smarty->is_cached($aOption['template_main], $contents_cache_id)) {
$sql = "SELECT cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_id = '" . intval($nCurrentCategoryId) . "'
AND cd.categories_id = '" . intval($nCurrentCategoryId) . "'
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'";
$category_result = $db->Execute($sql);
$category = $category_result->fields;
if (isset($cPath) && ereg('_', $cPath)) {
// check to see if there are deeper categories within the current category
$category_links = array_reverse($aCategoryPath);
for($i=0, $n=count($category_links); $i<$n; $i++) {
$sql = "SELECT c.categories_id, c.categories_image, c.parent_id, c.categories_status, cd.categories_name
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_status = '1'
AND c.parent_id = '" . intval($category_links[$i]) . "'
AND c.categories_id = cd.categories_id
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'
ORDER BY c.sort_order, cd.categories_name";
$categories_result = $db->Execute($sql);
if ($categories_result->RecordCount() < 1) {
// do nothing, go through the loop
} else {
break; // we've found the deepest category the customer is in
}
}
} else {
$sql = "SELECT c.categories_id, cd.categories_name, cd.categories_description,
c.categories_image, c.parent_id, c.categories_status
FROM " . $oosDBTable['categories] . " c,
" . $oosDBTable['categories_description] . " cd
WHERE c.categories_status = '1'
AND c.parent_id = '" . intval($nCurrentCategoryId) . "'
AND c.categories_id = cd.categories_id
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'
ORDER BY c.sort_order, cd.categories_name";
$categories_result = $db->Execute($sql);
}
$rows = 0;
$categories_box = '';
while ($categories = $categories_result->fields) {
$rows++;
$cPath_new = oos_get_path($categories['categories_id]);
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
$categories_box .= ' <td align="center" class="smallText" style="width: ' . $width . '" valign="top"><a href="' . oos_link($aModules['main], $aFilename['shop], $cPath_new) . '">';
if (oos_is_not_null($categories['categories_image])) {
$categories_box .= oos_image(OOS_IMAGES . $categories['categories_image], $categories['categories_name], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '
';
} else {
$categories_box .= oos_image(OOS_IMAGES . 'trans.gif', $categories['categories_name], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT, 'style="border: 3px double black"') . '
';
}
$categories_box .= $categories['categories_name] . '</a></td>' . "\n";
if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $categories_result->RecordCount())) {
$categories_box .= ' </tr>' . "\n";
$categories_box .= ' <tr>' . "\n";
}
$categories_result->MoveNext();
}
$new_products_category_id = $nCurrentCategoryId;
include OOS_MODULES . 'new_products.php';
if ( (ALLOW_CATEGORY_DESCRIPTIONS == 'true') && (oos_is_not_null($category['categories_heading_title])) ) {
$smarty->assign('oos_heading_title', $category['categories_heading_title]);
} else {
$smarty->assign('oos_heading_title', $aLang['heading_title]);
}
$smarty->assign(
array(
'category' => $category,
'categories_box' => $categories_box
)
);
}
$smarty->assign('oosPageHeading', $smarty->fetch($aOption['page_heading], $contents_cache_id));
$smarty->assign('contents', $smarty->fetch($aOption['template_main], $contents_cache_id));
$smarty->caching = false;
}<!--c2-->[/align]<!--ec2-->
um die Moduel der 'main' erweitern.
Der Aufbau einer Seite (Page) ist immer gleich
Du erweiterst zuerst die die Templates in $sOption
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1-->
$aOption['new_news] = $sTheme . '/modules/news/new_news.html';
if ($oEvent->installed_plugin('spezials')) $aOption['new_spezials] = $sTheme . '/modules/products/new_spezials.html';
if ($oEvent->installed_plugin('featured')) $aOption['featured] = $sTheme . '/modules/products/featured.html';
$aOption['upcoming_products] = $sTheme . '/modules/products/upcoming_products.html';<!--c2-->[/align]<!--ec2-->
um das Modul, was du haben möchtest.
Und fügst du anschliessend das Modul ein
z.B. Die 'wichtigsten Produkte' in dem Shop.
<!--c1--><div class='codetop'>QUELLTEXT[/align]<div class='codemain'><!--ec1--> if ($oEvent->installed_plugin('featured')) {
if (!$smarty->is_cached($aOption['featured], $oos_modules_cache_id)) {
include OOS_MODULES . 'featured.php';
}
$smarty->assign('featured', $smarty->fetch($aOption['featured], $oos_modules_cache_id));
}<!--c2-->[/align]<!--ec2-->
Im Template
fügst du nur noch die Anzeige ein...
{$featured}
{$new_news}
{$new_spezials}
{$new_products}
{$upcoming_products}
Dies ist die Leistungsfähigkeit von unserem Projekt mach dies mal mit einem
anderen Shop
Und wenn man dies mit den Modulen 'kappiert' hat... kann man diese überall veröffentlichen
cu
ralf