Jump to content

sonictrip.net

Members
  • Content count

    216
  • Joined

  • Last visited

Everything posted by sonictrip.net

  1. sonictrip.net

    Templatemonster templates

    I disabled the right click code for the moment until i figure out these problems. It's weird, they have the category code inside the column_left.php file instead of using the code in boxes/categories.php The following code is my whole column_left.php with the categories code that they use, can anyone spot anything wrong in this code or anything that might slow it down? There are a few things that stick out like : define(TABLE_CATEGORIES, "categories"); define(TABLE_CATEGORIES_DESCRIPTION, "categories_description"); The code above doesnt seem to exist in boxes/categories.php yet it is in the code below...? <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <table border="0" cellspacing="1" cellpadding="0" width="197" class="zxc6"> <tr><td style="background-image:url(images/m20.gif);" width="197" height="31"> <span class="tx2"><?=HEADER_TITLE_CATALOG?></span></td></tr> <tr><td height="7"></td></tr> <tr><td width="197"><ul> <? function tep_show_category($counter) { global $tree, $categories_string, $cPath_array, $ii; $ii++; if(!$tree[$counter]['level']){ $categories_string .= $categories_string ? '' : ''; $categories_string .= '<li class="bullet"><a href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display categry name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></li>'; }else{ // SUBCATEGORY $categories_string .= ''; for($i=0;$i<$tree[$counter]['level'];$i++) $categories_string .= ''; $categories_string .= '<li class="bullet"><a href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '> :: '; // display category name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></li>'; } if ($tree[$counter]['next_id'] != false && $ii < 40) { tep_show_category($tree[$counter]['next_id']); } } define(TABLE_CATEGORIES, "categories"); define(TABLE_CATEGORIES_DESCRIPTION, "categories_description"); $categories_string = ''; $tree = array(); $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.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $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.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } $categories_string .= ''; tep_show_category($first_element); $categories_string .= ''; echo $categories_string; ?> </ul></td></tr> <? include(DIR_WS_BOXES . 'specials.php');?> <? include(DIR_WS_BOXES . 'whats_new.php');?> <? include(DIR_WS_BOXES . 'information.php');?> </table>
  2. sonictrip.net

    How do you install a template

    I'd also like to know which exact files control the template look of the site but as far i know already, some of the files in the catalog folder need changing and also some of the files in the catalog/includes folder also need updating. The real pain when installing templates is that they are usually made for a stock oscommerce and not a modified version. Templates come with all the osc files included though so if you do replace all your files in osc with the template versions, you will lose whatever mods u had installed before and will probably have to install them all over again on the new template files. This is an absolute nightmare (especially if you have the group pricing mod installed beforehand) Im sure there's a faster way at applying a template so that minimal adjustments have to be made for a modded site but if someone could let us know which exact files to replace first, that would save a lot of time. The problem i have is when i've modified a site with numerous mods and then a client wants to use a templatemonster template or something. There seems to be a lot of work involved in modifying those templatemonster templates instead of just using a modded version of oscommerce and just redesigning it yourself. Although as much time could probably be spent redoing the design of a modded site... How do the experts apply a template to a heavily modded site with minimal effort?
  3. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Hi, I have SPPC installed and working properly except for one thing, when i try to copy a product, it gives me a 1062 - Duplicate entry '0-638' for key 1. When you hit the back button, the new product has been copied correctly and appears in the list. Now, when you browse the product listing on the main site, the price is displayed correctly, but when you click into a product info page, the price appears as 0.00. However, when you add the product anyway, the price in the shopping cart appears correctly. So, its just the product info page which seems to get affected by this problem. Would anyone have any idea why this is happening? Thanks.
  4. sonictrip.net

    PDF LINK

    Everything is kinda working ok except that when i click the "Click to view PDF Brochure", the file is not there, it didnt upload. When i manually upload the pdf to the images folder, it works. What code should i check to see about the uploading problem? Thanks.
  5. sonictrip.net

    [Contribution] PDF data-sheet maker v.1.1

    Does this PDF exporter let you export separate categories or does it just export your whole catalogue like pdf_catalog202 ?
  6. sonictrip.net

    PDF Catalog v.1.5

    Has anyone figured out how to convert html properly in the pdf's and also export categories separately? It would be even cooler if you could tick products from any category that you want to appear on the pdf for custom exports for individual customers... probably a long way off, that one...
  7. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Ah yes, i did indeedy, forgot to change the other $listing references to $listing[$x] You're a legend! :) While im here, there's also a small problem logging in as the admin SPPC account which brings up the white page with the different customer groups to login as for testing. Here's the link that appears on that screen: and here's the link after the continue button (which ahs a broken image link) is pressed: It just stays on the same screen though after you select a group and hit the continue button. Doesnt seem to go back to the site and even if you manually browse back to the site, the admin isn't logged in. Any ideas what to look into? One more thing and im sure this has been answered before. What changes do i make to featured.php for the customer group prices to change on the front page where Featured Products are displayed? Could anyone even point me to the page of this thread that this is on? Thanks for the help everyone, this is a great mod! JanZ, have you looked at Zencart v1.3.7 yet? Im absolutely gobsmacked by the amount of features that they now have in that software compared to even whats being planned for osC v3. Group pricing, featured products, multiple products images plus lots more is standard in Zencart now! The osC team have some catching up to do and i noticed in a post that they weren't that pushed about group pricing being in osC v3! Can you please push for your mod to be the one that gets used coz they'd be making a big mistake not to. Great mod, great support, great work! :thumbsup:
  8. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Hi Janz, thank for that, it seemed to sort the problem of duplicate products anyway! :) One more thing though, the products are showing up ok now, when you click the thumbnails, the product description loads up with the correct product_id but when you click the "details" button or "Buy now" button, there doesnt seem to be a product_id associated with these particular buttons so i was wondering how to make the same product link which is working on the thumbnails, work on the details and buy now buttons as well?? Here's the bit of code i think affects this: if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; // EOF Separate Pricing per Customer case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); $product_contents[] = $lc_text; } $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)1 . "'"); $product = tep_db_fetch_array($product_query); $new_products['products_description'] = $product['products_description']; Thanks!
  9. sonictrip.net

    Easy Populate & Products Attributes

    Hi, thanks for the reply. I tried those changes you mentioned and it actually looked like it was going to work but it didnt. I made the changes to easy_populate.php and then downloaded a new model/price/qty version of the file, made the changes to customer_price_1 and customer_group_1 and reuploaded the file. Now most of the 400 or so products seem to have been changed to inactive but yet there are 8 products that are still set to active (not sure why coz there's no difference between them and the rest of the products online or on the downloaded file) Would it help if the v_status column was downloaded with the model/price/qty file so when uploading again, the v_status will be set correctly already without it having to guess what state to leave the product in? What code would i need to change to retrieve the v_status info and upload the v_status info again? Forgot to mention, im using EP v2.90 Thanks for the help Surfalot! :)
  10. sonictrip.net

    Easy Populate & Products Attributes

    Hi, I have the SPPC mod working on my site and its almost working properly with Easy Populate. I can download the catalog by model/price/qty and see the extra group prices appearing in excel. When i copy all the prices from the price column over to the customer_price_1 column in Excel, then make all the cells of customer_group_id_1 equal to 1 so the prices apply to that group. I then upload the the file through the admin and it uploads successfully but when i check the catalog side of the site, all the products that were deactivated have now become active, which i dont want to happen happen. Can you exclude fields from being changed in the upload file somehow? So, whats the best way to solve this, make easy populate download the file with the v_status field included in the EP file or how do you stop easy populate from reactivating products even though those fields shouldnt be changed in the uploaded file, only the following fields are in the uploaded file: v_products_model v_products_price v_products_quantity v_customer_price_1 v_customer_group_id_1 v_customer_price_2 v_customer_group_id_2 v_customer_price_3 v_customer_group_id_3 Can anyone help? Thanks.
  11. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Thanks JanZ, that seemed to have done the job, much appreciated! :)
  12. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Hi JanZ, thanks for the reply, i tried making the changes you suggested above but the product_listing.php is still showing only 1 product cloned multiple times... i enabled some debug code on the page to echo whats happening and you can see in the output text that the products are different in the array but down the page it still shows the one product multiple times, have a look at this link to see what i mean: http://www.bwear.ie/catalog_separatepricin...php/cPath/21_25 When i use the product_listing.php-SPPCv414 file, everything works fine but the layout is rows instead of columns. Any other ideas what could be causing the array to be displayed wrong? Cheers. Here's my product_listing.php file again: <?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $ adapted for Separate Pricing Per Customer v4 2005/02/26 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2" bgcolor="#E9E6E3"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $column = 0; echo ' <table width="533" cellpadding="0" cellspacing="0" bgcolor="#ffffff"> <tr> <td height="33" bgcolor="#F4F0ED" valign="middle"> <table bgcolor="#F4F0ED" cellpadding="0" cellspacing="0" width="531"> <tr> <td width="4"></td> <td width="32"><img src="images/m05.jpg"></td> <td width="5"></td> <td width="488"><span class="ch">Categories » '.$breadcrumb->trail(' » ').'</span></td> </tr> </table> </td> </tr> <tr><td height="1"></td></tr> <tr> <td height="20" bgcolor="#E9E6E3"> <table cellpadding="0" border=0 cellspacing="0"> <tr> <td width="5"></td> <td></td> </tr> </table> </td> </tr> <tr> <td valign="top"><table width="100%" cellpadding="1" cellspacing="1"> <tr> '; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives echo '<pre>'; print_r($listing); echo '</pre>'; $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($no_of_listings > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."' "); // $no_of_pg_products = tep_db_num_rows($pg_query); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing[$x]['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; // EOF Separate Pricing per Customer case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); $product_contents[] = $lc_text; } $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)1 . "'"); $product = tep_db_fetch_array($product_query); $new_products['products_description'] = $product['products_description']; echo ' <td valign="top" bgcolor="#E9E6E3"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table cellpadding="0" border="0" cellspacing="0" width=100%> <tr> <td width="1"></td> <td valign="top"> <table width="100%" border=0 cellpadding="0" cellspacing="0"> <tr><td height=19 valign=top><br><div align="center">'.$product_contents[1].'</div></td></tr> <tr> <td><br><div align="center"> '.$product_contents[0].' </div><div align="left"></div></td> </tr> <tr><td><div align="center"><b>Price:</b></div></td></tr> <tr> <td height=30 valign=middle><div align="center"><span class="ch3">'.$product_contents[2].'</span></div></td> </tr> <tr><td> <table align="center" cellpadding="0" cellspacing="0"> <tr><td height="5"></td></tr> <tr> <td width="100" valign="top"> <table width="120" cellpadding="0" border="0" cellspacing="0"> <tr> <td><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('small_view.gif') . '</a></div></td> <td width="4"><div align="center"></div></td> <td><div align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a></div></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> '; $column ++; if ($column >= 2) { $rows ++; $column = 0; echo ' </tr> <tr> '; } else echo ' '; } echo ' </tr> </table> </td> </tr> </table> '; //new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); echo '<div class=PageHeading>Categories</div>'; new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td height=2></td></tr> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?>
  13. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Here's the end of product_listing.php from the above post: //new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); echo '<div class=PageHeading>Categories</div>'; new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td height=2></td></tr> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?>
  14. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Hi, thanks for the reply. Ive been looking at the product_listing.php page and im not sure what order i should have put the sppc code in (would have been the same as the instructions) but there are other mods on that page so probably a conflict somewhere. JanZ, can you take a look at my product_listing page to see if anything looks out of the ordinary, thanks. <?php/* $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $ adapted for Separate Pricing Per Customer v4 2005/02/26 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2" bgcolor="#E9E6E3"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $column = 0; echo ' <table width="533" cellpadding="0" cellspacing="0" bgcolor="#ffffff"> <tr> <td height="33" bgcolor="#F4F0ED" valign="middle"> <table bgcolor="#F4F0ED" cellpadding="0" cellspacing="0" width="531"> <tr> <td width="4"></td> <td width="32"><img src="images/m05.jpg"></td> <td width="5"></td> <td width="488"><span class="ch">Categories » '.$breadcrumb->trail(' » ').'</span></td> </tr> </table> </td> </tr> <tr><td height="1"></td></tr> <tr> <td height="20" bgcolor="#E9E6E3"> <table cellpadding="0" border=0 cellspacing="0"> <tr> <td width="5"></td> <td></td> </tr> </table> </td> </tr> <tr> <td valign="top"><table width="100%" cellpadding="1" cellspacing="1"> <tr> '; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($no_of_listings > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."' "); // $no_of_pg_products = tep_db_num_rows($pg_query); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing[$x]['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; // EOF Separate Pricing per Customer case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); $product_contents[] = $lc_text; } $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)1 . "'"); $product = tep_db_fetch_array($product_query); $new_products['products_description'] = $product['products_description']; echo ' <td valign="top" bgcolor="#E9E6E3"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table cellpadding="0" border="0" cellspacing="0" width=100%> <tr> <td width="1"></td> <td valign="top"> <table width="100%" border=0 cellpadding="0" cellspacing="0"> <tr><td height=19 valign=top><br><div align="center">'.$product_contents[1].'</div></td></tr> <tr> <td><br><div align="center"> '.$product_contents[0].' </div><div align="left"></div></td> </tr> <tr><td><div align="center"><b>Price:</b></div></td></tr> <tr> <td height=30 valign=middle><div align="center"><span class="ch3">'.$product_contents[2].'</span></div></td> </tr> <tr><td> <table align="center" cellpadding="0" cellspacing="0"> <tr><td height="5"></td></tr> <tr> <td width="100" valign="top"> <table width="120" cellpadding="0" border="0" cellspacing="0"> <tr> <td><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('small_view.gif') . '</a></div></td> <td width="4"><div align="center"></div></td> <td><div align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a></div></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> '; $column ++; if ($column >= 2) { $rows ++; $column = 0; echo ' </tr> <tr> '; } else echo ' '; } echo ' </tr> </table> </td> </tr> </table> '; //new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][
  15. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Had to rename the folder and use a backup til this problem is sorted. Have a look at this link instead: http://www.bwear.ie/catalog_sppc/index.php/cPath/22_35 thanks.
  16. sonictrip.net

    Seperate Pricing Per Customer v3.5

    Hi everybody, This contrib seemed to install properly and things seem to be working fine for different groups etc. but i do have one small problem though on the product_listing.php page... When i click onto a category on the catalog side, it lists the products in the category except that all the products which it lists are the exact same product. Has anyone else had this problem or would anyone know which bit of code to even begin looking at? Have a look at this page to see what i mean: http://www.bwear.ie/catalog/index.php/cPath/21_28 Thanks for any help!
  17. Lovely Jubbily! This mod doesnt seem to create automatic thumbnails but i found one that works well with this mod which creates thumbnails out of all images that get uploaded! Then it just displays the thumbnail in the product listing and the big image in popup mode. It does this with the 3 product imags and all 6 extra images as well. There's only a few edits that need to be made to one file: html_output.php Well worth checking out, my images look crystal clear now and load much quicker!: http://www.oscommerce.com/community/contri...matic+thumbnail
  18. How are they thumbnailed? I installed this mod ages ago and it seems to be working but on the catalog side, the thumbnails are the html scaled down versions of the big image, just like the original OsC code used to do. So, it still needs to spend ages downloading the big versions of every image even for the thumbnail product listing pages. Which files should i be looking to change or does this mod automatically create thumbnails? thanks.
  19. sonictrip.net

    CVV mod install problems

    Hi, i installed all the files for the CVV mod 1.7 and im now missing all the modules on the payment page in the admin section. It just comes up with Authorize.net and Credit Card as the available modules, but when you click either of them, there is no option to remove the module. I know i should have removed the CC module first like the instructions say, but i forgot to... I tried replacing all the files in the package with the backup versions and its still not showing the other modules on the admin/modules/payment page. Does anyone know how to remove the CC module manually so that i can reinstall it again and get back my list of modules? Need to get this sorted asap, thanks! :blink:
  20. sonictrip.net

    Featured Product Support v1.5.4

    hehe, worked like a charm, thanks Mookie_Jam! :thumbsup: For those that are not sure, i know i wasnt anyway, go into phpmyadmin, table featured and click insert to add a new row to the featured list. Once added, refresh the admin page and it should be working fine... :)
  21. sonictrip.net

    Featured-Products V1.3 Error

    I also changed from windows to a linux server and im getting the following error when i try to click the "featured" link in the admin section: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-12, 12' at line 1 select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from products p, featured s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -12, 12 [TEP STOP] Anyone have any idea whats happening here? Thanks... :thumbsup:
  22. sonictrip.net

    Can't Login to Admin

    Found a fix for this problem: http://www.oscommerce.com/community/bugs,3...;+Configuration
  23. sonictrip.net

    Can't Login to Admin

    Hi, i copied a site i made from one host to another to save time installing mods and i cant seem to login to the admin side. I get the following error when i go to catalog/admin: Fatal error: Cannot re-assign $this in /home/acoustic/public_html/catalog/admin/includes/classes/upload.php on line 31 Line 31 from upload.php is just below //self destruct: if (tep_not_null($this->file) && tep_not_null($this->destination)) { $this->set_output_messages('session'); if ( ($this->parse() == true) && ($this->save() == true) ) { return true; } else { // self destruct $this = null; return false; } } } It doesnt show the login box, just a page with the above error. I think it's related to the image_html_package_1.2 but it could also be easy populate, cc_cvv+encryption v1.7, Linkmatics_AttributeSetsPlus_v1.01 or Who's Online Enhancement 2.00. When i login to the catalog side, the front page shows ok, but when i try to access a category, the following error gets displayed: 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '70' [TEP STOP] Anyone know why this is happening? Thanks! :thumbsup:
  24. sonictrip.net

    Easy Populate & Products Attributes

    Easy Populate v2.90b is working great for me now, thanks pixclinic! :)
  25. Ok, doing a find and replace on all " quotes " worked, but it means i lose the quotes after sizes of clothes etc. so instead of 12" 14" 16" etc. it just reads 12 14 16 Ah sure it'll do!
×