Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TomCavendish

Archived
  • Posts

    134
  • Joined

  • Last visited

Everything posted by TomCavendish

  1. Using the short description contribution here: http://www.oscommerce.com/community/contributions,4452 When a product has no description, the word "Array" is displayed as the short description rather than nothing. Anyone able to solve it?
  2. I have a store fully working with SEO URLS. However, I'm moving a copy of the site (still with the same host) to new webspace and changing the domain name. I copied a copy of the site accross to the new webspace, and made the configure db changes. I had a problem with the URLS not showing on product_info pages , but then deleted the SEO cache from the db and the SEO URLS now work fine. My problem - when I go to add a product to the cart, the cart shows as empty. You'd think that as the site is exactely the same as the one fully working on the other webspace, and only a very slight change to the configure files, that it would work, but I have this empty cart problem. Anyone able to help?
  3. I've been using this contribution for a couple of years and it works very well. Great for adding articles and new sections to your website. Works the same as adding categories and products. http://www.oscommerce.com/community/contributions,909/ However, how do you turn off the category counts for it? (which display the number of articles in brackets) They must be hard coded in the files in the contribution, but I'm not even sure what to look for. Can anyone help? TC
  4. This very simple 1 file contribution could be very good but requires a couple of small tweaks that are beyond me. http://www.oscommerce.com/community/contributions,2795/ Two things that need changing; 1. It does not display a column for 'Special Price'- so all products are listed at their full price. 2. It is currently only listing products that belong to a 'Category' AND belong to a 'Manufacturer' - and so isn't listing all the products in the store. It only needs to get rid of the references to the manufacturer. Anyone able to help? To make this a real cracker, the last column could display the 'On Sale Until' date.
  5. Actually, this contribution did just what I wanted after all. TIP: To give the cleaner look I simply didn't upload the arrow gif's etc. and did a few tweaks with the css. Many thanks to those who worked on this! :thumbsup:
  6. Trouble is I don't know how/where to put the <div class="nav1"> into my code for boxes/categories.php Here's my categories.php <?php /* $Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $foo, $categories_string, $id, $aa; for ($a=0; $a<$foo[$counter]['level']; $a++) { if ($a == $foo[$counter]['level']-1) { $categories_string .= "<font color='#ff0000'></font>"; } else { $categories_string .= "<font color='#ff0000'></font>"; } } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $categories_string .= "<hr>"; } else {$aa=1;} } $categories_string .= '<nobr><a nowrap href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">' . tep_image(DIR_WS_IMAGES . '', '') . ' ';; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= "<b><font color='#ff0000'>"; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</font></b>'; } // if (tep_has_category_subcategories($counter)) { // $categories_string .= '->'; // } $categories_string .= '</nobr></a>'; // if (SHOW_COUNTS == 'true') { // $products_in_category = tep_count_products_in_category($counter); // if ($products_in_category > 0) { // $categories_string .= ' (' . $products_in_category . ')'; // } } $categories_string .= '<br>'; if ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new InfoBoxHeading($info_box_contents, true, false); $categories_string = ''; // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '>' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category $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='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_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 = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$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($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); // WebMakers.com Added: All products or All Products Multiple Purchase // new infoBox($info_box_contents); // WebMakers.com Added: Show All Products Listing if (SHOW_ALL_PRODUCTS_BOX=='1') { $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'); } // WebMakers.com Added: Show multiple product listing add for all products if (SHOW_PRODUCT_LISTINGS_MULTI_ADD_BOX=='1') { // All Products Multiple Purchase $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_PRODUCTS_ALL, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCT_ALL . '</a>'); } new InfoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> [/code]
  7. I really like the categories menu on this website. http://www.cookinstyle.co.uk It looks much cleaner without the arrows, and the whole background of the cell changes colour as you go over it, rather than just the text link. Anyone able to do this for OSC?
  8. I use the table method whereby a user selects the correct delivery rate for their order. However, the second option down in the list is selected by default (when I want it to be the top option). How do I change it so that the top option is selected by default, or even if none were selected by default (which would be even better).
  9. Sorry if this sounds like a stupid question, but does this run automatically every month without a cron job? :blink:
  10. Reply to myself here, but it might help others. Not mentioned in the instructions is that you may have to change localhost to the name of your db server. $home = "localhost" ;
  11. I'd love to get this working. I've done this: But get the error message: Anyone able to help please?
  12. Chemo, This is a FANTASTIC contribution and your support has been outstanding. I think this contribution deserves a paypal donation from users as a way of thanks. OSC wouldn't be what it is now becoming if it were not for people like you. Looking forward see seeing your good ideas in the future, and getting the credit you deserve.
  13. I sent you the temp ftp details. Hope you got them ok. Cheers! Tommy
  14. I'm getting there. :-" I've now got it as far as clicking on a product displays the product details, and correctly shows the URL under the pName setting: http://www.mysite.com/catalog/catalog/prod...name-of-product However, when I switch to the 'Rewrite' option (which is the one I REALLY want to use), the URL is correct in the form of: http://www.mysite.com/catalog/catalog/name-of-product.html But it produces a 404 page, rather than display the product details page. Any ideas? :'(
  15. Hello Bobby, In my application_top.php I have: // define the project version define('PROJECT_VERSION', 'osCommerce 2.2-MS2-CVS'); I had changed that myself. Tommy :(
  16. Nope, I'm using MS2, but you sure were right, that function was missing. Should anyone else need to know it should be in catalog/general.php. I now don't get the error. However, when I click a latest product (etc.) I get the URL: http://www.mydomain.comdir_ws_http_catalog...ame=scx-digital Whilst clicking a category goes to: http://www.mydomain.comdir_ws_http_catalog....php/?cPath=212 My site structure is in the form of www.mydomain.com/catalog/catalog/default.php. In www.mydomain.com/catalog/catalog/.htaccess I have put the code: RewriteEngine On # Change "folder" to your catalog directory name RewriteBase /catalog/catalog/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} Would love to get it going. If so, it's going on a fresh site, so will be interesting to show the SEO effects of it to everyone else here.
  17. Can anyone help? (I'm happy to make a donation if it works)
  18. Bobby, I'd really love to get your contribution working, and appreciate your talents, but have been pulling my hair out over it. Now 3.59am in the UK. :'( 2 problems I have (could be related). 1. When I go to my homepage, I get: Fatal error: Call to undefined function: tep_output_string() in /******/public_html/catalog/catalog/includes/functions/html_output.php on line 80 2. On "Step 6 (1) Find this code - admin/categories.php" The code to find isn't in the(my) file categories.php. I'd appreciate any help. Cheers! Tom
  19. If anyone can solve this then I'll treat them :) When I add a product to the basket that does not have any additional fields (colour, size, text, etc). I get the following error: However it works when a product is given extra fields. From /catalog/includes/modules/order_details.php // Product options names $attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0); if ($attributes_exist == 1) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { echo '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } echo '</td>' . "\n";
  20. I also get the error above when i don't put any text in the extra field. :(
  21. Hey guys, This works fine when I give products additional attributes, However, I get an error message when adding a product to the basket that does not have any additional attributes. The error given on shopping_cart.php is: Warning: Variable passed to each() is not an array or object in /catalog/shopping_cart.php on line 65 Warning: reset(): Passed variable is not an array or object in /catalog/includes/modules/order_details.php on line 83 Warning: Variable passed to each() is not an array or object in /catalog/includes/modules/order_details.php on line 84 Anyone able to help? :unsure:
  22. Solved by adding to general.php //// //CLR 030228 Add function tep_decode_specialchars // Decode string encoded with htmlspecialchars() function tep_decode_specialchars($string){ $string=str_replace('>', '>', $string); $string=str_replace('<', '<', $string); $string=str_replace(''', "'", $string); $string=str_replace('"', "\"", $string); $string=str_replace('&', '&', $string); return $string; }
  23. I would check that you have// infobox ?require(DIR_WS_CLASSES . 'boxes.php'); // initialize the message stack for output messages ?require(DIR_WS_CLASSES . 'message_stack.php'); ?$messageStack = new messageStack; // Shopping cart actions ?if (isset($HTTP_GET_VARS['action'])) { around lines 316-24 of includes/application_top.php Hth, Matt Many thanks Matt, I'd really love to get this going. I then got an error for 'message stack', so I've commented that out. I have 2 problems left. 1. The contents of the basket are not displayed on catalog/shopping_cart.php 2. Error Message on pressing the final order confirmation button - /catalog/checkout_process.php *Fatal error*: Call to undefined function: tep_decode_specialchars() in* /opt2/home3/crystal7/public_html/catalog/catalog/checkout_process.php* on line* 213* Yet the order does actually go through and can be viewed in the admin. Thanks for any help you can give.
  24. When using the new version of the shopping_cart.php file, and adding an item to the basket, i get the error message: Is anyone able to help me on this? (I always try to help others...).
  25. Fixed the problem. The db table defines for the Admin need to go in 'application_top.php' and not 'database_tables.php'.
×
×
  • Create New...