Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

joop

Archived
  • Posts

    75
  • Joined

  • Last visited

Posts posted by joop

  1. @Assembler

     

    I made some changes in the search algorithm so it searches for the first letters in the words seperated by spaces.

     

    f?.

     

    In the standandaard osc db

     

    [a] or [a b] or [a b l]

     

    gives A Bug's Life

     

    but

     

    [a b e] or [ab] doesn't but [a b ;] does again.

     

    Futhermore i have made a version voor the standaard search box.

     

    You can test it on http://www.watersport.mine.nu

     

    If you want i can provide you with the sources so you can update your contribution.

     

    Rgds,

     

    Joop.

  2. In order to make this by the way excellent contribution to work with the "other" (topic 129041) SEO URL's contribution i had to make some little changes.

     

    I hope it's not a problem i post them here and perhaps you can do something with it.

     

     

     

    In googlesitemap/index.php around line 58:

     

    // SEO OTHER BEGIN

    if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){

    require_once(DIR_WS_CLASSES . 'seo.class.php');

    $seo_urls = new SEO_URL($languages_id);

    } else if ( file_exists(DIR_WS_CLASSES . 'url_rewrite.php') ){

    require_once(DIR_WS_CLASSES . 'url_rewrite.php');

    $other_rewrite = true;

    }

    // SEO OTHER END

     

     

    In google/sitemap.class.php just below function GenerateProductSitemap(){

     

     

    // SEO OTHER BEGIN

    global $other_rewrite;

     

    if (!$other_rewrite) {

    $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered

    FROM " . TABLE_PRODUCTS . "

    WHERE products_status='1'

    ORDER BY products_ordered DESC";

    } else {

    $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_name, ptc.categories_id

    FROM " . TABLE_PRODUCTS . " AS p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " AS ptc

    ON ptc.products_id=p.products_id

    LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " AS pd

    ON pd.products_id=p.products_id

    WHERE p.products_status='1'

    ORDER BY p.products_ordered DESC";

    }

    // SEO OTHER END

    if ( $products_query = $this->DB->Query($sql) ){

    $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success';

    $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query);

    $container = array();

    $number = 0;

    $top = 0;

    while( $result = $this->DB->FetchArray($products_query) ){

    $top = max($top, $result['products_ordered']);

    // SEO OTHER BEGIN

    if (!$other_rewrite)

    $location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);

    else

    $location = tep_href_link(FILENAME_DEFAULT, 'cPath=' . tep_get_product_path($result['pID']) . '/' . $result['products_name'], 'NONSSL', false);

    // SEO OTHER END

    $lastmod = tep_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added'];

    $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;

    $ratio = $result['products_ordered']/$top;

    $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');

  3. I had a problem with nested categories which had the same name and also products under different categories with the same name.

     

    f.i.

    1) Natuurtapijt->Matros->Kokos->Boucle

    2) Kleden->Matros->Kokos->Boucle

     

    2) Always went from the top category to the second category of 1) and also the product info of 2 came from 1.

     

    I have solved this problem by creating an extra field in the $categories_array named ['parent_id'] and in the same test where rewrite_url.php tests also test if the parent_id of the current_id is the same as the previous_id or zero.

     

    For the product level i created a field in the products_array ['category_id'] in which i put the category_id from table_products_to_categories.

     

    On product level i test if the products_name is the same in the table and if the category of that product is the same as the last rewritten category.

     

    It works for me now.

     

    I don't know if there are more people with this problem then i will try to post an update or else i will just use it for myself and will not border to build it in the cache functions also.

  4. Hi,

     

    Good contribution !

     

    My testshop www.watersport.mine.nu is in directory /var/www/demoshop and everything works alright.

     

    My real site www.tapijtonline.com is in directory /var/www/tapijtonline/shop/catalog en when i turn the rewrite rule

    RewriteRule ^(.*) index.php on in apache voor that directory i get a popup window on every loaded page saying there is a syntax error on line 1.

     

    Any Sugestions ?

     

    Ps. Only in IE with the debugger on.

  5. I have a big problem with the worldpay payment module but i will come back to that after i am sure i tested EVERYTHING and EVERY combination i can think of.

     

    In the meanwhile i wonder if the line

     

    tep_draw_hidden_field('MC_oscsid', $oscSid);

     

    shouldn't read

     

    tep_draw_hidden_field('MC_oscsid', $osCsid); ?

     

    Futhermore i saw some topics regarding worldpay stying on the last screen when in 100 or 101 mode.

     

    Jou can solve that by using there test Visa card # 4000 0000 0000 0002

    security: 123

    Expiry: within 7 years from now.

     

    It will then do the callback and display the button.

     

    Rgds,

     

    Joop.

  6. btw

     

    I changed the autologon/worldpay test to

     

    if ((ALLOW_AUTOLOGON == 'true') && (strpos(strtolower($SESSION_USER_AGENT),'worldpay) === false))

     

    I just took over a project where worldpay is used so i am a newbie in the worldpay world.

     

    Is it true that worldpay doesn't do a callback when a testpayment (mode 100) is made ?

     

    It just stays on the last worldpay success screen without a button or so.

     

    Joop.

×
×
  • Create New...