Jump to content
Latest News: (loading..)

alix32

Members
  • Content count

    29
  • Joined

  • Last visited

Profile Information

  • Real Name
    Alix
  • Gender
    Male
  • Location
    Bordeaux, France
  1. Uhm well Mr Phil...I hear you. Right now I'm re-building the site on 2.3.4.1 as quickly as possible. I gave the BS Edge version a shot but couldn't get my head round it. Right now I just need to get the site running on PHP 5.6 at least before my host provider turns the lights off as I'm still running on PHP 4 + it's not compatible with TLS1.2. 2.3.4.1 was the fastest option for me to be back in business. And then I'll indulge into the BS version.
  2. Of course the sort_order! That worked perfectly thanks JcMagpie! <?php if (tep_db_num_rows($pi_query) > 1) { $pi_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' and sort_order=2"); ?>
  3. Hello all! I'm in the process of re-building my very old 2.2 site on 2.3.4. On the product_info page, my main image is displaying nicely along with its sub-images below. What I'd like to do now is copy over the image display code further down the page in a product description section. In that section, I'd like to display 2nd image of the product only if there are more than 1 image linked to that product, else I'd like to display the main image again. I've been scratching my head on this one but my poor knowledge of PHP has brought me to posting my question to this forum. So here's the code I have to display my product images. The main image appears in large (width of 410) and the next images appear smaller (width of 102) below the main image <?php if (tep_not_null($product_info['products_image'])) { $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); if (tep_db_num_rows($pi_query) > 0) { ?> <div id="piGal" style="float: left;"> <nav> <ul> <?php $pi_counter = 0; while ($pi = tep_db_fetch_array($pi_query)) { $pi_counter++; $pi_entry = ' <li ' . ($pi_counter != 1 ? 'style="float:left;" class="imgthumbHover"' : '') . '><a href="'; if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '#piGalimg_' . $pi_counter; } else { $pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false); } if ($pi_counter == 1) {$piwidth = '410'; $piheight = ''; } else { $piwidth = '102'; $piheight = '200'; } $pi_entry .= '"rel="zoombox[vacances]">' . tep_image(DIR_WS_IMAGES . $pi['image'], $products_name, $piwidth, null) . '</a>'; if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>'; } $pi_entry .= '</li>'; echo $pi_entry; } ?> </ul> </nav> </div> <?php } else { ?> <div id="piGal" style="float: left;"> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image'], '', 'NONSSL', false) . '"rel="zoombox[vacances]">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> </div> <?php } ?> I understand that code will display my main image wider and above my sub-images if the product has more than 1 image, else it just displays the only image linked to that product. But how could I change this code so that only the 2nd image displays if the product has more than 1 image, else display the only image linked to that product? Hope that makes sense and someone knowledgeable is willing to take a few mns to help me out, Thanks!
  4. Hi there, I'm getting a table not found issue although I can see the table in my database. 1146 - Table 'soonlineshop.NEWSLETTER_ABONNEMENT' doesn't exist select count(*) as checkinscrits from NEWSLETTER_ABONNEMENT where abonnement_addresse_email = 'test@@test.com' I checked the name of the table in both the database and in file newsletter_abonnement.php and they match so I have no idea how I could get that error. Would someone be able to help please? Thanks
  5. Ok thanks Jack - I'll just uninstall it and install the latest version and see what that does.
  6. Hi, I built an oscommerce site a while back www.mossurfing.com with this add on and made some tweaks to have hyphen separators between my category titles (www.mysite.com/category1-category2) Example: http://www.mossurfing.com/women-snow-jackets-c-118_127.html I am currently building a new site but with a different host this time. I just copied over my previous site to this new host however my hyphen separators get wiped out (www.mysite.com/category1category2) Example: http://www.soon-line.com/hommesaccessoires-c-112_159.html I haven't changed anything so I'm thinking this is an issue on the host side but what could it be? Any help/advice would be very welcome! Many thanks
  7. Hi, I have duplicated products accross several categories. I just installed the "Specials in Categories List" however the products show as many times as they have been duplicated. Would you know how I could fix the code so that each product would show once only? Here are the instructions I followed: Step 1: Using the Admin tool create a "Specials" category at the top level of the categories tree. Do NOT put any products in this category!!!! Make a note of the category id number. You can find this out by clicking on the Specials link and looking at the URL in your browser where it says "......index.php?cPath=xx&....." the xx is the category id. +++++++++++++++++++++++++++++++ Step 2: Open up \catalog\index.php in your editor At line 15 immediately after: require('includes/application_top.php'); add: // Flag for SPECIALS category - change this number to your specials category id number if ($cPath == 30) { change 30 to xx from your URL $AHspecials = 1; } +++++++++++++++++++++++++++++++ Step 3: at about line 186 find: } else { // show the products in a given categories immediately after } else { add: if ($AHspecials == 1) { // We show all specials $listing_sql = "select " . $select_column_list . " p.products_id, pd.short_desc, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and s.status = '1' and p.products_id = p2c.products_id and p.products_id = s.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "'"; } else { +++++++++++++++++++++++++++++++++ Step 4: at about line 199 immediately after } } add: } +++++++++++++++++++++++++++++++++ save \catalog\index.php. Step 5: Add specials to your site by using the Admin tool "Catalog, Specials" Do NOT put any products in the Special category using "Catalog, Categories / Products" they will not show!!!! Thanks for your help!!
  8. Hi! Thanks a lot for taking the time to reply. Your first option is actually something I never thought of although it sounds bleeding obvious :) Well in my situation it is as I only have about 20 products on sale so great for short term solution. In the longer term I will look into this 2nd option. Thanks again
  9. Hi, In the product listing and for all products on sale, I'd like to have a "sale" written on the product's image. Has anyone got an idea of how to do this? Many thanks!
  10. alix32

    Who's Online Enhancement 1.4

    Today it's working and i haven't touched anything! No idea of what went wrong. Sorry for the waist of time Glen. Alix
  11. alix32

    Who's Online Enhancement 1.4

    Hi Glen and thanks a lot for your reply. I haven't touched the Javascript options...do you know where I should be looking at? I believe it's in my internet options / advanced? It may be my Java version? Thanks
  12. alix32

    Who's Online Enhancement 1.4

    Hi, I installed version 3.5.4 and is brilliant. However, although I haven't touched anything, my pages don't refresh anymore. It looks like this happens since I updated to IE7. has this happened to anyone too? Is there a fix to this? Thanks, Alix
  13. I've found the problem! :blush: When I moved to the new server, the options "track stock?" in the admin/products_attributes.php page had defaulted back to no. So I just had to set each of my product options in the top left hand corner of the page to yes. Sorry!
  14. I've checked that all files were and they are. I've tried several times to upload and nothing changes. I've made backups. I've got this feeling that problem sits in the stock.php page which is the one which displays the products attributes stock and allows them to be updated. The only difference I could point out is that I used to be on register_globals off and on this new server I'm on register_globals on. Also, I downgraded from MySQL 5.0 to MySQL 4.1...would that be the cause you think?
  15. Hi, I have QTPro V4.2. I've just transferred my site onto a new server and my page admin/stock.php does not display the stock per attribute anymore. It just displays a quantity with a button "update" next to it. Normally I would see the attributes, the quantities and a button "Add". In the admin section, I do have the page "products_attributes.php" correctly populated and on the online store itself, the attributes display correctly too. I checked the page "stock.php" against the one I have on the old server and there's no difference. I also checked that I transferred all my database tables onto my new server but all semms ok...big problem :( Thanks to anyone who knows and would help me out!
×