Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
  1. ecoren

    Dynamic SiteMap

    Well i think its a bit more difficult so that there should be a cycle to make all the necessary language files required. I didnt succed yet, is it the $file variant which contains the filenames from the catalog directory? Does it includes the extension (.php)? Another way could be to create a language file with the given names of the files displayed but of course its not automatic however seems simplier.
  2. ecoren

    Dynamic SiteMap

    Hi! Would it be possible to display on the sitemap the current language file HEADBAR_TITLE value instead of the filenames (which are english, so not language specific and contain ugly underscores)? I guess there is something to be changed at: $files['path'][] = $file; $name = explode(".php", $file); $files['name'][] = ucfirst($name[0]); Any help would be greatly appreciated!
  3. ecoren

    Display PRICE PER ITEM

    i found that $listing['products_price / products_items_in_pack' gives the zero value i guess the expression cannot be interpreted. i might do it by adding a column to products and specials (products_price_per_item and define the default value in the data entry file as price/items_in_pack) but is it the only way?
  4. I need a new contrib to display price per item. (i sell packages with more items in each) ex. a pack contains 5 cds costs 5 eur so it should be 1 eur / cd) I guess i would need a new row in the products table: items/pack. I added a column to the products table : products_items_in_pack, till that everythings works great. After i wanted price_per_item to be calculated dinamically (seemed more simple even to to avoid problems with special price) But now in the price per item column i see 0 EUR for every item. I did the followin: added to index.php // create column list $define_list = array 'PRODUCT_LIST_ITEMS_IN_PACK' => PRODUCT_LIST_ITEMS_IN_PACK, 'PRODUCT_LIST_PRICE_PER_ITEM' => PRODUCT_LIST_PRICE_PER_ITEM); for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) case 'PRODUCT_ITEMS_IN_PACK': $select_column_list .= 'p.products_items_in_pack, '; break; $listing_sql = (...) p.products_items_in_pack ... switch ($column_list[$sort_col-1]) ... case 'PRODUCT_LIST_ITEMS_IN_PACK': $listing_sql .= "p.products_items_in_pack " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_PRICE_PER_ITEM': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; and to includes/modules/product_listing.php: case 'PRODUCT_LIST_ITEMS_IN_PACK': $lc_text = TABLE_HEADING_ITEMS_IN_PACK; $lc_align = 'center'; break; case 'PRODUCT_LIST_PRICE_PER_ITEM': $lc_text = TABLE_HEADING_PRICE_PER_ITEM; $lc_align = 'center'; break; case 'PRODUCT_LIST_ITEMS_IN_PACK': $lc_align = 'right'; $lc_text = ' ' . $listing['products_items_in_pack'] . ' '; break; case 'PRODUCT_LIST_PRICE_PER_ITEM': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price / products_items_in_pack'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price / products_items_in_pack'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price / products_items_in_pack'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } i thought it might be a data type error but i tryed in phpmyadmin CODESELECT `products_price` / `products_items_in_pack` as price_per_item FROM `products` WHERE 1and that works : price_per_item 120.000000 265.000000 the items_in_pack is integer(5). any ideas ?