[Skip Header and Navigation] [Jump to Main Content]
בית
דרופל ישראל
הבית של קהילת מפתחי ומשתמשי דרופל בישראל

Primary Links

  • בית
  • דרופל בעברית
  • חדש באתר
  • מדריכים
  • תמיכה
  • לוח דרושים
  • נותני שירות בדרופל
  • אתרי דרופל ישראליים
  • שאלות נפוצות
  • ארועים והדרכות
בית » פורומים » תמיכה כללית

?How to link ubercart catalog main category name to the folowing page

asi, ב', 08/11/2010 - 22:54

בעמוד הבא
http://www.keflahayot.co.il/catalog/31
יש ליד כל שם קטגוריה כפתור "מידע נוסף" שמפנה לעמוד הבא ושם הקטגוריה אינו קישור אלה רק טקסט
אני מעונין להפוך את שם הקטגוריה לקישור
אני חושב שהשינוי אמור להתבצע ב template.php באזור הזה של הקוד

function phptemplate_uc_catalog_browse($tid = 0) {
drupal_add_css(drupal_get_path('module', 'uc_catalog') .'/uc_catalog.css');

$output = '';
$catalog = uc_catalog_get_page((int)$tid);
$catalog->name == "Catalog" ? $catalog->name = t('Products') : '';
$catalog->name = t('Catalog !catalog', array('!catalog' => $catalog->name));
drupal_set_title(check_plain($catalog->name));
drupal_set_breadcrumb(uc_catalog_set_breadcrumb($catalog->tid));
$types = uc_product_types();
$links = array();
$child_list = array();
foreach ($catalog->children as $child) {
if (!empty($child->nodes)) {
$links[] = array('title' => $child->name . (variable_get('uc_catalog_breadcrumb_nodecount', FALSE) ? ' ('. $child->nodes .')' : ''), 'href' => uc_catalog_path($child),
'attributes' => array('rel' => 'tag'),
);
}
if (!empty($child->image)) {
$image = '

';
if (module_exists('imagecache')) {
$image .= l(theme('imagecache', 'uc_category', $child->image['filepath']), uc_catalog_path($child), array('html' => TRUE));
}
else {
$image .= l(theme('image', $child->image['filepath']), uc_catalog_path($child), array('html' => TRUE));
}
$image .= '

';
}
else {
$image = '

';
}
$grandchildren = array();
$j = 0;
$max_gc_display = 3;
foreach ($child->children as $i => $grandchild) {
if ($j > $max_gc_display) {
break;
}
$g_child_nodes = 0;
foreach ($types as $type) {
$g_child_nodes += taxonomy_term_count_nodes($grandchild->tid, $type);
}
if (1/$g_child_nodes/) {
$grandchildren[$i] = l($grandchild->name, uc_catalog_path($grandchild), array('class' => 'subcategory'));
$j++;
}
}
//$grandchildren = array_slice($grandchildren, 0, intval(count($grandchildren) / 2) + 1, TRUE);
if ($j > $max_gc_display) {
//array_push($grandchildren, l(t('More...'), uc_catalog_path($child), array('class' => 'subcategory')));
}
/if ($child->nodes) {/
$cell_link = '

' . $image .'
'. $child->name .'
';
if (variable_get('uc_catalog_show_subcategories', TRUE)) {
$subs = '
    ';
    foreach($grandchildren as $sub) {
    $subs .= '
  • '.$sub.'
  • ';
    }
    $subs .= '

';
$cell_link .= '
' . $subs . '
' . l(t("To catalog !catalog", array("!catalog" => $child->name)), uc_catalog_path($child)) . '

' . "\n";
}
$child_list[] = $cell_link;
/}/
}
/if (!empty($catalog->image)) {
if (module_exists('imagecache')) {
$output .= theme('imagecache', 'uc_thumbnail', $catalog->image['filepath'], $catalog->name, $catalog->name, array('class' => 'category'));
}
else {
$output .= theme('image', $catalog->image['filepath'], $catalog->name, $catalog->name, array('class' => 'category'));
}
}
/

// Build an ORDER BY clause for the SELECT query based on table sort info.
if (empty($_REQUEST['order'])) {
$order = 'ORDER BY p.ordering, n.title, n.nid';
}
else {
$order = tapirsort_sql(uc_product_table_header());
}

$sql = "SELECT DISTINCT(n.nid), n.sticky, n.title, n.created, p.model, p.sell_price, p.ordering
FROM {node} n
INNER JOIN {term_node} tn ON n.vid = tn.vid
INNER JOIN {uc_products} AS p ON n.vid = p.vid
WHERE tn.tid = %d AND n.status = 1
AND n.type IN (". db_placeholders($types, 'varchar') .") ". $order;

$sql_count = "SELECT COUNT(DISTINCT(n.nid))
FROM {node} n
INNER JOIN {term_node} tn ON n.vid = tn.vid
INNER JOIN {uc_products} AS p ON n.vid = p.vid
WHERE tn.tid = %d
AND n.status = 1
AND n.type IN (". db_placeholders($types, 'varchar') .")";

$sql = db_rewrite_sql($sql);
$sql_count = db_rewrite_sql($sql_count);
$sql_args = array($catalog->tid);
foreach ($types as $type) {
$sql_args[] = $type;
}
$catalog->products = array();
$result = pager_query($sql, variable_get('uc_product_nodes_per_page', 12), 0, $sql_count, $sql_args);
while ($node = db_fetch_object($result)) {
$catalog->products[] = $node->nid;
}
if (count($catalog->products)) {
if (count($links)) {
$output .= theme('links', $links, array('class' => 'links inline uc-categories')) ."
\n";
}
$output .= $catalog->description;
$output .= theme('uc_catalog_products', $catalog->products);
$output .= '

' . theme('pager') . '

';
}
elseif(arg(0) == 'catalog' && !arg(1)) {
// Display table of child categories similar to an osCommerce site's front page.
$columns = variable_get('uc_catalog_category_columns', 3);
$cat_rows = array();
$row = array();
$i = 1;
foreach ($child_list as $cell) {
$row[] = array('data' => $cell, 'class' => 'category ' . ($i % 2 == 0 ? 'even' : 'odd'));
if ($i % $columns == 0) {
$cat_rows[] = $row;
$row = array();
}
$i++;
}
if (count($row) > 0 && count($row) < $columns) {
if (count($cat_rows) >= 1) {
$row = array_merge($row, array_fill(count($row), $columns - count($row), array('data' => ' ', 'class' => 'category')));
}
$cat_rows[] = $row;
}
$output .= $catalog->description;
$output .= theme('table', array(), $cat_rows, array('class' => 'category'));
}
else {
if (count($links)) {

$rows = array();
foreach($links as $link) {
$rows[] = array(
'data' => array(
$link['title'],
array('data' => l('<span>'.t('More info').'</span>', $link['href'], array('html' => true)), 'class' => 'more-info-button'),
),
'class' => 'cat-category',
);
}
$output .= theme('table', array(), $rows, array('cellspacing' => '0', 'cellpadding' => '0', 'class' => 'int-categories'));
//$output .= theme('links', $links, array('class' => 'links inline uc-categories')) ."<br />\n";
}
else {
$output .= '<div class="no-products">'. t('No products are available in this category.') .'</div>';
}
//$output .= $catalog->description;
$output .= '<div class="pager-wrapper">' . theme('pager') . '</div>';

}

return $output;
}

‹ חיבור בין ubercart ל rules AdaptiveTheme ›
  • חברי האתר יכולים לשלוח תגובה - כניסה , הצטרפות.
תגים:
  • תמיכה כללית
  • uber cart

איפה מתחילים ולאן ממשיכים?

מקום טוב להתחיל בו הוא הורדה של הגרסה העדכנית של דרופל בעברית.

להורדת דרופל בעבריתלשפות וגרסאות אחרות, Drupal.org

יש לנו באתר מדריכים שונים, הכוללים מדריך להתקנת דרופל על המחשב המקומי או על שרת אירוח באינטרנט, כמו גם מדריכים לעיצוב ופיתוח.

בעזרת המדריכים השונים באתר ובעזרת קבוצות הדיון שלנו, אפשר למצוא את כל המידע הנחוץ להקמה והתאמה אישית של אתרי דרופל. כדאי לבדוק גם את ערוצי התמיכה הנוספים שלנו

שלום אורח

כניסה|הצטרפות

כעת מחוברים 1 משתמשים מזוהים, ו-6 אורחים:
אהוד

yanivriv הוא החבר הכי חדש בקהילה!

דרופל ישראל בפייסבוק דרופל ישראל בטוויטר דרופל ישראל ב-LinkedIn

חדש בדיונים בפורום

  • דופיניטי מחפשת מפתח PHP |‏ Dofinity
  • לא רואה דף בתוך דף |‏ hodspot
  • מחפש דרופליסט מומחה |‏ razooloo
  • שחזור דרופל |‏ taldan4040
  • מסך לבן לאחר לחיצה על שמירת תצ... |‏ taldan4040
עוד בפורום

חדש בבלוגים

  • מדריך לבנייה ועיצוב של ניוזלטר... |‏ tom
  • ecommerce module |‏ avrilev
  • הסרת שיער בלייזר |‏ Alex Borodach
  • ערכת עיצוב חדשה FontFolio... |‏ ישראל
  • Mobile Drupal - סיכום הדרכה |‏ לבבי
עוד בבלוגים

אירועים והדרכות קרובות

אין פעילויות להצגה. יאללה, מי מארגן משהו?

ללוח האירועים המלא

חדש באתרים ישראלים

  • weisscarpetcleaning |‏ tzur
  • סרוולוג - חלקי מטוסים |‏ tzur
  • בייבי-ביורן ישראל |‏ tzur
  • טבעוני תוספי תזונה |‏ morantivo
  • עוגת הגבינה של ישראל - ישראל ה... |‏ zohar
עוד אתרים ישראלים
Powered by Drupal, an open source content management system
אירוח ופיתוח האתר באדיבות לינווייט - דרופל , אנדרואיד וקוד פתוח
עיצוב, קסמי css וערכת העיצוב טנדו - תום ביגלאייזן
שותף לדרך - אמנון לבב - ייעוץ משולב
דרופל ישראל הינה חלק מרשת הקנטינה
"כללי המשחק" ותנאי השימוש באתר
[Jump to Top] [Jump to Main Content]