Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

www.in.no

Members
  • Content count

    361
  • Joined

  • Last visited

Everything posted by www.in.no

  1. Support tread for CKEditor [wyswyg] Contribution can be found here. CKEditor Thanks goes to escri2 for adding this contribution and make it working in other contribution. I create this forum tread where we can discuse and helteach other to integrate this editor into more contribution. I am not a coding guru, but together we may be able to get this cotribution to work with the major contribs where a wyswyg editor is needed. Today it is used in theese contribution / functions. Information Pages Unlimited v2.07 -> Link Products descriptions. (instructions in CKEditor contribution.) It is a greate editor buildt on and replaceing the old FCKEditor. There is still some functions that can be improved / added. -File / image uplade function. -Image browsing. -Needed code change to other contribution. -Function to not load javascript if not needed. (same function as for tinyMCE) - Adjust ckeditor pack fore OSC. Remove unneeded files in pack. - Configuration changes to better work in OSC -?? If you have this contribution installed and/or got it working with other contribution and want to help. Please post the code changes here or make a uplod to the contribution page with instruction.
  2. www.in.no

    Header Tags SEO

    Not a pain, just pleasure :) admin/includes/configure.php includes/configure.php
  3. www.in.no

    Header Tags SEO

    Normally in configuration files, but i don't know if HT SEO stores the path other places...
  4. www.in.no

    Header Tags SEO

    I thought that most of your work was validating, otherwise i should think that your code never should work as good as i does :-)
  5. www.in.no

    Header Tags SEO

    @@isysni Looks like the server path has changed. /home/kidditra/public_html/bluetoothit/ is not the same as /home/kidditra/public_html/www.bluetoothit.co.uk/
  6. www.in.no

    Header Tags SEO

    I am aware of thet it is just an anchor name, but the output i get from the W3 validation show me what i think is a invalid link. I changed it to this and now it is working and showing a correct link. (Not concerned about the space, it validate anyway.) <a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '#' . $header_tags_array['title'] . '"> But the "/ made it not validate, and " should be paired, and in the original code the numbers of " was odd not even. So eighter there was one to little or one to much. And the validating is more for fun and have a quick check that i don't miss or add to many tags that break up the code. Many of the addons is not written for the latest OSC (2.3.3), and even if they claim to be 2.3 ready there are still some major changes after that.
  7. www.in.no

    All Products SEO

    HTML is not case-sensitve, but validation at W3 looks like it is. :-)
  8. www.in.no

    Header Tags SEO

    OK, but i think it is a little miss formatted. Shouldn't the " be removed in front of /# as there is 5 pcs. in that line and you also have a space after /# ', making the link also have space between and therefor not valid. Stock code echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>'; Changed if (HEADER_TAGS_DISPLAY_CURRENTLY_VIEWING == 'true') { echo '<div style="margin-top:5px;"><div style="text-align:center" class="smallText">' .TEXT_VIEWING . ' '; if (! tep_not_null($header_tags_array['title'])) $header_tags_array['title'] = $product_info['products_name']; echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '/#' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>'; echo '</div></div>'; } /*** End Header Tags SEO ***/
  9. www.in.no

    Header Tags SEO

    Is this code correct. Getting validation error on this, and it seems duplicated. " . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . ' " Should it be " . '">' . $header_tags_array['title'] . ' " if (HEADER_TAGS_DISPLAY_CURRENTLY_VIEWING == 'true') { echo '<div style="margin-top:5px;"><div style="text-align:center" class="smallText">' .TEXT_VIEWING . ' '; if (! tep_not_null($header_tags_array['title'])) $header_tags_array['title'] = $product_info['products_name']; echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>';
  10. www.in.no

    All Products SEO

    The /all-products.php file does also have some errors. There are used a uppercase </A> tag, And the tep_draw_form had wrong parameter order. It was <?php echo tep_draw_form('allproducts_cat', FILENAME_ALLPRODS_SEO, '', 'post') and should be <?php echo tep_draw_form('allproducts_cat', FILENAME_ALLPRODS_SEO, 'post', '') all-products.php
  11. www.in.no

    All Products SEO

    There are one validating error in the code i made with moving all table to the all-products.php file.: There is need for one table in the /price_list.php file as the function is called upon itself inside /include/functions/all-products.php file <?php echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">'; AP_GetGroup(0,0); echo '</table>'; ?> And the all-products.php file with indications on whitch line to remove, function AP_GetGroup($id_parent, $position){ global $languages_id; $groups_price_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where c.parent_id = " . (int)$id_parent . " and cd.language_id = " . (int)$languages_id . " order by c.sort_order"); $titleShown = false; $cols = 2; if (ALL_PRODUCTS_SEO_PRICE_SHOW_MODEL == 'true') $cols++; if (ALL_PRODUCTS_SEO_PRICE_SHOW_PRICE == 'true') $cols++; if (ALL_PRODUCTS_SEO_PRICE_SHOW_QTY == 'true') $cols++; $width = floor(100/$cols); //CUT FROM HERE TABLE echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while ($groups_price = tep_db_fetch_array($groups_price_query)) { $catpad = ""; $catPad = str_replace(" ", " ", str_pad($catPad, ($position * 3), " ", STR_PAD_LEFT)); //pad str wont accept so prefill and replace if($position == 0 && ! $titleShown) { $titleShown = true; echo '<tr><td colspan="' . $cols . '" width="100%" class="allCategoryPriceSubHdr"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>'; echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_CATEGORY . '</td>'; if (ALL_PRODUCTS_SEO_PRICE_SHOW_QTY == 'true') { echo '<td align="left" width="' . $width . '%"> ' . PRICE_HEADING_STOCK . '</td>'; } if (ALL_PRODUCTS_SEO_PRICE_SHOW_MODEL == 'true') { echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_MODEL . '</td>'; } echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_PRODUCT . '</td>'; if (ALL_PRODUCTS_SEO_PRICE_SHOW_PRICE == 'true') { echo '<td align="right" width="' . $width . '%">' . PRICE_HEADING_PRICE . ' </td>'; } echo '</tr></table></td></tr></table>'; } echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">'; if (AP_CheckProducts($groups_price['categories_id']) || $position == 0){ echo '<tr><td colspan="' . $cols . '" width="100%" class="allproductPriceSubHdr">' . $catPad . $groups_price['categories_name'] . '</td></tr>'; AP_GetProducts($groups_price['categories_id'], $width); } AP_GetGroup($groups_price['categories_id'],$position+1); } //CUT END FROM HERE echo '</table>'; }
  12. www.in.no

    Header Tags SEO

    Thanks, :) successfully checked as XHTML 1.0 Transitional You had used the closing tag for CHARSET, the rest was missing.
  13. www.in.no

    All Products SEO

    FOR INFO: CSS error in styelsheet after validating. Missing px at end /*** Begin All Products SEO ***/ .allproductsBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffce00; padding:0px 3} should be /*** Begin All Products SEO ***/ .allproductsBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffce00; padding:0px 3px}
  14. www.in.no

    Header Tags SEO

    i have just run W3 validating on my site and it got some errors with closing tags related to HT SEO Meta tags.. Would like to have cleaned out this errors, and have tried to search in the files where it is genereted from. Is it just to add selfclosing tag to the generated tags? Any quick info on witch file they are generated from or how to change? Thanks.
  15. www.in.no

    All Products SEO

    Just a tip for the <nobr> tag used in the boxes. In case you havent already included it in next release use in code this <span class="nobr"> and add this to css. .nobr { white-space:nowrap; }
  16. www.in.no

    All Products SEO

    SOME copy and past issues in the last one. Just a quick addon to the code posted with redesign. The code in bm_xxxxfiles must also be altered to remove the styles so it use stock osc style insted. Just so it is complete if someone want to change over. catalog/includes/modules/boxes/bm_categories.php /**** BEGIN ALL PRODUCTS SEO ****/ $categories_string .= '<div><a href="' . tep_href_link(FILENAME_ALLPRODS_SEO, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '">' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '</a></div>'; if (ALL_PRODUCTS_SEO == 'true' && ALL_PRODUCTS_SEO_DISPLAY_PRICE_LIST == 'true') { $categories_string .= '<div><a href="' . tep_href_link(FILENAME_ALLPRODS_SEO_PRICE_LIST, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_PRICE_LIST . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_PRICE_LIST . '</nobr></a></div>'; } /**** END ALL PRODUCTS SEO ****/ catalog/includes/modules/boxes/bm_specials.php /**** BEGIN ALL PRODUCTS SEO ****/ ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br /><del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br /><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>' . ' <a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_SPECIALS . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_SPECIALS . '</nobr></a></div>' . /**** END ALL PRODUCTS SEO ****/ catalog/includes/modules/boxes/bm_whats_new.php /**** BEGIN ALL PRODUCTS SEO ****/ ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . ' <br><br><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_WHATSNEW . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_WHATSNEW .'</nobr></a></div>' . /**** END ALL PRODUCTS SEO ****/
  17. www.in.no

    All Products SEO

    Just a quick addon to the code posted with redesign. The code in bm_xxxxfiles must also be altered to remove the styles so it use stock osc style insted. Just so it is complete if someone want to change over. catalog/includes/modules/boxes/bm_categories.php /**** BEGIN ALL PRODUCTS SEO ****/ $categories_string .= '<div><a href="' . tep_href_link(FILENAME_ALLPRODS_SEO, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '">' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '</a></div>'; if (ALL_PRODUCTS_SEO == 'true' && ALL_PRODUCTS_SEO_DISPLAY_PRICE_LIST == 'true') { $categories_string .= '<div><a href="' . tep_href_link(FILENAME_ALLPRODS_SEO_PRICE_LIST, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_PRICE_LIST . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_PRICE_LIST . '</nobr></a></div>'; } /**** END ALL PRODUCTS SEO ****/ catalog/includes/modules/boxes/bm_specials.php /**** BEGIN ALL PRODUCTS SEO ****/ ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br /><del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br /><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span></div>' . ' <a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_SPECIALS . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_SPECIALS . '</nobr></a></div>' . /**** END ALL PRODUCTS SEO ****/ catalog/includes/modules/boxes/bm_whats_new.php /**** BEGIN ALL PRODUCTS SEO ****/ ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . ' <a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_WHATSNEW . '"><nobr>' . BOX_INFORMATION_ALLPRODS_SEO_WHATSNEW .'</nobr></a></div>' . /**** END ALL PRODUCTS SEO ****/
  18. www.in.no

    All Products SEO

    Turn on/off is ok, i was more thinking off text links where you can put brand name/ one main keyword as part of the text link.
  19. www.in.no

    All Products SEO

    Then it could be made as a turn on/off function from admin. And you could use it in many ways. BRAND-001 BRAND-001 ... BRAND2-001 etc...
  20. www.in.no

    All Products SEO

    Just had a second look, would it help SEO wise to also have the modell as a text link to the product also. On both price_list and onn all-products.
  21. www.in.no

    All Products SEO

    I just updated my ALL-Products with some changes in the design so that the price list look more like stock osc. Feel free to use or include in a future version. There are 4 files to update/change. cataloge/price_list.php Removed a lot of tables code and changed it to use div's allready used in OSC. Added the continue button. Screenshot: Attached as files <?php /* $Id: price_list.php, v 1.0 All Products SEO v1.0 by Jack_mcs, http://www.oscommerce-solution.com osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2004 osCommerce Portions Copyright 2012 oscommerce-solution.com Released under the GNU General Public License */ require('includes/application_top.php'); include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLPRODS_SEO); require(DIR_WS_FUNCTIONS . FILENAME_ALLPRODS_SEO); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } $print = (isset($_GET['print']) ? $_GET['print'] : 'no'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); $breadcrumb->add(TITLE_PRICE, tep_href_link(FILENAME_ALLPRODS_SEO_PRICE_LIST)); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <div class="ui-widget infoBoxContainer"><br> <div class="ui-widget-header ui-corner-top infoBoxHeading"> <?php echo TITLE_PRICE . ' ' . date("Y") . ' '; ?> <?php // print function and edit remove by willross if ($print == "yes") { echo '<a class="smallText" style="font-size:10px;" title="Printable version" href="' . tep_href_link(FILENAME_ALLPRODS_SEO_PRICE_LIST, '', 'NONSSL') . '">' . "[full view]" . '</a>'; } else { echo '<a class="smallText" style="font-size:10px;" title="Printable version" href="' . tep_href_link(FILENAME_ALLPRODS_SEO_PRICE_LIST, 'print=yes', 'NONSSL') . '">' . "[printable version]" . '</a>'; } ?> </div> <div class="ui-widget-content ui-corner-bottom productListTable"> <?php AP_GetGroup(0,0); ?> </div><br> <!-- body //--> <div class="buttonSet"> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span> </div> </div> <?php if ($print != "yes") { require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); } ?> /includes/functions/all-products.php Changed some of the code to use div's and moved all table generation into this file. The corrections above regarding TAX is included. <?php /* $Id: all-products.php,v 1.6 2010/01/03 by Jack_mcs osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Portions Copyright 2009 oscommerce-solution.com Released under the GNU General Public License */ // group have products? function AP_CheckProducts($id_group){ $products_price_query = tep_db_query("select products_to_categories.products_id FROM products_to_categories where products_to_categories.categories_id = ".$id_group." LIMIT 0,1"); if ($products_price = tep_db_fetch_array($products_price_query)) { return true; } return false; } // list products determined group function AP_GetProducts($id_group, $width) { global $currencies, $languages_id; $query = ""; if(ALL_PRODUCTS_SEO_PRICE_SHOW_OUT_OF_STOCK == 'false') { $query = " and p.products_status = 1"; } $where = GetDisabledCats($where); $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.customers_email_address = '' and p.quotes_email_address = '' " : ''; $listing_sql = "select distinct pd.products_name, p.products_quantity, p.products_price, p.products_model, p2c.products_id, p2c.categories_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " p inner join " . TABLE_PRODUCTS_DESCRIPTION ." pd on p.products_id = pd.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id inner join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p2c.products_id = p.products_id where p2c.categories_id = " . (int)$id_group . $query . $where . $quotes . " and pd.language_id = '" . $languages_id . "' order by pd.products_name"; $products_query = tep_db_query($listing_sql); $x=0; while ($products = tep_db_fetch_array($products_query)) { $cell = tep_get_products_special_price($products_price['products_id']); if($cell == 0) { $cell = $products['products_price']; } if ($x==1) { $rowBkgnd = ''; $x = 0; } else { $rowBkgnd = 'alt'; $x++; } echo '<tr class="' . $rowBkgnd . '">'; echo '<td align="left" width="' . $width . '%"> </td>'; if(ALL_PRODUCTS_SEO_PRICE_SHOW_QTY == 'true') { echo '<td width="' . $width . '%" align="left" class="productListing-data"> (' . $products['products_quantity'] . ')</td>'; } if (ALL_PRODUCTS_SEO_PRICE_SHOW_MODEL == 'true') { echo '<td width="' . $width . '%" align="left" class="productListing-data">' . $products['products_model'] . '</td>'; } echo '<td width="' . $width . '%" class="productListing-data"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $products['products_id']) . '">' . str_replace(" ", " ", strip_tags($products['products_name'])) . '</a></td>'; if (ALL_PRODUCTS_SEO_PRICE_SHOW_PRICE == 'true') { echo '<td width="' . $width . '%" align="right" class="productListing-data">'; if (tep_not_null($products['specials_new_products_price'])) { echo '<span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span> '; } else { echo $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . ' '; } } echo '</tr>'; } } // get all groups function AP_GetGroup($id_parent, $position){ global $languages_id; $groups_price_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where c.parent_id = " . (int)$id_parent . " and cd.language_id = " . (int)$languages_id . " order by c.sort_order"); $titleShown = false; $cols = 2; if (ALL_PRODUCTS_SEO_PRICE_SHOW_MODEL == 'true') $cols++; if (ALL_PRODUCTS_SEO_PRICE_SHOW_PRICE == 'true') $cols++; if (ALL_PRODUCTS_SEO_PRICE_SHOW_QTY == 'true') $cols++; $width = floor(100/$cols); echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">'; while ($groups_price = tep_db_fetch_array($groups_price_query)) { $catpad = ""; $catPad = str_replace(" ", " ", str_pad($catPad, ($position * 3), " ", STR_PAD_LEFT)); //pad str wont accept so prefill and replace if($position == 0 && ! $titleShown) { $titleShown = true; echo '<tr><td colspan="' . $cols . '" width="100%" class="allCategoryPriceSubHdr"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>'; echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_CATEGORY . '</td>'; if (ALL_PRODUCTS_SEO_PRICE_SHOW_QTY == 'true') { echo '<td align="left" width="' . $width . '%"> ' . PRICE_HEADING_STOCK . '</td>'; } if (ALL_PRODUCTS_SEO_PRICE_SHOW_MODEL == 'true') { echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_MODEL . '</td>'; } echo '<td align="left" width="' . $width . '%">' . PRICE_HEADING_PRODUCT . '</td>'; if (ALL_PRODUCTS_SEO_PRICE_SHOW_PRICE == 'true') { echo '<td align="right" width="' . $width . '%">' . PRICE_HEADING_PRICE . ' </td>'; } echo '</tr></table></td></tr></table>'; } echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">'; if (AP_CheckProducts($groups_price['categories_id']) || $position == 0){ echo '<tr><td colspan="' . $cols . '" width="100%" class="allproductPriceSubHdr">' . $catPad . $groups_price['categories_name'] . '</td></tr>'; AP_GetProducts($groups_price['categories_id'], $width); } AP_GetGroup($groups_price['categories_id'],$position+1); } echo '</table>'; } function GetDisabledCats($where) { global $languages_id; $ap_query = tep_db_query("select * from " . TABLE_ALL_PRODUCTS_SEO . " where language_id = " . (int)$languages_id); $ap = tep_db_fetch_array($ap_query); $parts = explode(",",trim($ap['disabled_categories'], ",")); if (tep_not_null($parts[0])) { //at least one disabled category exists for ($p = 0; $p < count($parts); ++$p) { $catIDS .= " c.categories_id != $parts[$p] and "; } $catIDS = substr($catIDS, 0, -4); $where .= (tep_not_null($where)) ? " and $catIDS " : " where $catIDS "; } return $where; } function GetCategoryTree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) { global $languages_id; if (!is_array($category_tree_array)) $category_tree_array = array(); if ( (sizeof($category_tree_array) < 1) && ($exclude != '0') ) $category_tree_array[] = array('id' => '0', 'text' => TEXT_ALL_CATEGORIES); if ($include_itself) { $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . (int)$languages_id . "' and cd.categories_id = '" . (int)$parent_id . "'"); $category = tep_db_fetch_array($category_query); $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']); } $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { if ($exclude != $categories['categories_id']) $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name']); $category_tree_array = GetCategoryTree($categories['categories_id'], $spacing . ' ', $exclude, $category_tree_array); } return $category_tree_array; } ?> /includes/language/xxxx/all-products.php Just added one more so the heading is more correct. define('PRICE_HEADING_CATEGORY', 'KATEGORI'); define('PRICE_HEADING_PRODUCT', 'PRODUKT'); /style.css Just changes some of the properties and removed some that i dont use anymore as i have changed to styles already in OSC. /*** Begin All Products SEO ***/ .allproductsBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffce00; padding:0px 3} a.allproductsBox { color: #ff0000; } a.allproductsBox:hover { color: #00cc00; } .allproductPriceHdr { font-family: Verdana, Arial, sans-serif; font-size: 14px; background: #bbc3d3; color: #000; font-weight : bold; } .allproductPriceSubHdr { font-family: Verdana, Arial, sans-serif; font-size: 12px; background: #A6C9E2; color: #FFF; font-weight : bold; } .allCategoryPriceSubHdr { border: 1px solid #4297d7; background: #5c9ccc; color: #ffffff; font-weight: bold; } h2 { font-size: 14px; font-weight: normal; margin-bottom: 0; padding-bottom: 5px; } /*** End All Products SEO ***/
  22. www.in.no

    All Products SEO

    :) Thanks Jack. That worked.. Have not checked the changes you made yet as it is to late. Was it error in the script or the different in my shop..?
  23. www.in.no

    All Products SEO

    For info: If you want to breake the line in all-products.php with letters and numbers into 2 seperate lines you can add this to the. In cataloge/all-products.php Find if (ALL_PRODUCTS_SEO_DISPLAY_NUMBERS == 'true') { Add over this if (ALL_PRODUCTS_SEO_BREAKE_2LINES == 'true') { $firstletter_let .= '<br>'; } and in phpmyadmin you can add INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'All Products break letters Numbers into 2 lines', 'ALL_PRODUCTS_SEO_BREAKE_2LINES', 'true', 'If set to true, breake letters and numbers into 2 lines', 279, 55, '', '', NULL, 'tep_cfg_select_option(array(''true'', ''false''), '); Then you can turn on off in admin under all-products.
  24. www.in.no

    All Products SEO

    The products_tax_class_id is set to 1 in the db. And the rate with same id is set to 25%
  25. www.in.no

    All Products SEO

    Hi, What it output is this: PRICE: 100.0000 0 KR 100.0000 Looks like the tax id is not there, but i dont know what causing it as it display prices with tax all other places except from the price_list.php Is there any checking for the configuration value from config stating "Display Prices with Tax"
×