korsh Posted November 1, 2003 Share Posted November 1, 2003 hi, Does anyone know what should be put into this piece of code to replace 'arabianbazaar' in allprods.php around line 144? $this_url = tep_href_link(FILENAME_PRODUCT_INFO, 'arabianbazaar=' . str_replace(" ", "_", $this_name). '&products_id=' . $this_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false); thanks korsh Quote Link to comment Share on other sites More sharing options...
WendyM Posted November 1, 2003 Share Posted November 1, 2003 put your site name there....I put "Its2cheap"(without the .com) Quote Link to comment Share on other sites More sharing options...
korsh Posted November 1, 2003 Share Posted November 1, 2003 Thanks for that Quote Link to comment Share on other sites More sharing options...
besheer Posted November 2, 2003 Share Posted November 2, 2003 Great mod! I just have one problem...broken links. Clicky Not all of them are broken. For example, check the first link. Any ideas? Thanks. Quote Drive it like you stole it. Link to comment Share on other sites More sharing options...
azer Posted November 7, 2003 Share Posted November 7, 2003 I have two different languages in my site and everytime I hit one product in the all products result I go to the product info page in english, how can I fix that? im using french and english also and each time i click on a product in the french part , it shows me the english product ! any idea .? Quote MS2 Link to comment Share on other sites More sharing options...
Spaceboy Posted November 16, 2003 Share Posted November 16, 2003 yip..due to a really stupid beginner's code error...haha..2 loops (for) using the same variable $i. Just find the second "for" in allprods.php (line 113) and change i>j..use $j instead of $i for all lines in the for-loop. Now you should have your list of products for each language and with the correct link. This my code : ... for ($j = 0; $j < $num_prods; $j++) // Traverse Rows // DDB - 031116 - change i-> j { // Rotate Row Colors if ($j % 2) // Odd Row { $row_col = 'class="productListing-odd"'; } else // Guess... { $row_col = 'class="productListing-even"'; } $this_id = $products_array[$j]['id']; $this_name = $products_array[$j]['name']; $this_model = $products_array[$j]['model']; $this_manufacturer = $products_array[$j]['manufacturer']; $this_price = $products_array[$j]['price']; $this_special = $products_array[$j]['special']; $this_tax = $products_array[$j]['tax']; $this_url = tep_href_link(FILENAME_PRODUCT_INFO, 'name=' . urlencode($this_name). '&products_id=' . $this_id . '&language=' . $this_language_code, 'NONSSL', false); // DDB - 031115 - dropped use of DEFAULT_LANGUAGE echo "<tr $row_col>"; echo "<td class='productListing-data' align='left'><a href='$this_url'>$this_name</a></td>"; echo "<td class='productListing-data' align='left'><a href='$this_url'>$this_model</a></td>"; echo "<td class='productListing-data' align='center'><a href='$this_url'>$this_manufacturer</a></td>"; if (tep_not_null($this_special)) { echo "<td class='productListing-data' align='right'><a href='$this_url'><span class='productSpecialPrice'>".$currencies->display_price($this_special, tep_get_tax_rate($this_tax))."</span></a></td>"; } else { echo "<td class='productListing-data' align='right'><a href='$this_url'>".$currencies->display_price($this_price, tep_get_tax_rate($this_tax))."</a></td>"; } echo "</tr>\n"; } This should work ! Didier. Quote Published modified Contributions Link to comment Share on other sites More sharing options...
Spaceboy Posted November 16, 2003 Share Posted November 16, 2003 Attention ! The special prices are NOT displayed. Something is missing in the database query to retrieve the specials.special_new_products_price. This is the db query to use (allprods.php, line 97) : ... m.manufacturers_name, s.specials_new_products_price from " . ... Some other errors with this contrib in case you want to know : - records are not unique if products used in different categories (use patch described in this thread) - only english is displayed. Apply patch described in post just above to have all products listed for each language - header of table is not language specific. Patch is available. Hope this helps you...now just curious to see what Google is gonna do with it... Didier. Quote Published modified Contributions Link to comment Share on other sites More sharing options...
azer Posted November 16, 2003 Share Posted November 16, 2003 Spaceboy - daniel ur tweak seems to work with version 2.4 but not with version 2.61 ?! could we release a proper new version 2.62 with : 1.records are not unique if products used in different categories (use patch described in this thread)2. only english is displayed. Apply patch described in post just above to have all products listed for each language 3. header of table is not language specific. Patch is available. 4.and also make only one file with the use of configuration in the php file like: show model = true/false show manufacturer = true/false 5. does someone can tell me what do i have to add to the query so product with price = 0 are not shown Quote MS2 Link to comment Share on other sites More sharing options...
coffman Posted November 19, 2003 Share Posted November 19, 2003 Just a tip for those of you that may have special characters in your product titles or names. This contrib does not deal at all gracefully with some of them. I have several product titles that contain single quotes and slashes. The links rendered are broken. To fix this you can add something similar to the following hack around line 145: $foo = str_replace("'","_",$this_name); //replace single quotes $tmp_name = str_replace("/","_",$foo); //replace slash Then change the var this_name in the $this_url = statment to the tmp_name variable mentioned above. You can repeat the above as many times as needed. The URL will contain underscores where necessary, but the actual description seen by a surfer should they see the page will look normal. Hope this helps someone. Quote -MichaelC Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2003 Share Posted December 10, 2003 I'm using v2.61 and the Spacecowboy's patch for multiple languages did not work for me: I have 3 languages configured, and the patch displays 3 times each product, but all with same language. Solution is in the allprods.php, line 107, $products_query: replace $languages_id by $this_language_id. Now it works... Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2003 Share Posted December 10, 2003 If you want to display only one language at a time, then forget the modification of the precedent post and just put the line 91: for ($i=0; $i<sizeof($languages_array); $i++) as comment. Like that only the current language will be processed, no more loop. You can also get rid of some more lines if you don't want the loop, but let's keep it simple for now. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2003 Share Posted December 10, 2003 Sorry I wrote too fast the previous post. To get the product list only in the selected language, see the following code, it starts at line 84 for me: - WHERE clause added in $languages_query - for loop as comment. - $i=0 added to point to the only row of $languages_array $languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " WHERE languages_id=".(int)$languages_id." order by sort_order"); while ($languages = tep_db_fetch_array($languages_query)) { $languages_array[] = array('id' => $languages['languages_id'], 'name' => $languages['name'], 'code' => $languages['code'], 'image' => $languages['image'], 'directory' => $languages['directory']); } // Next line commented to get a product list according to selected language. // for ($i=0; $i<sizeof($languages_array); $i++) { $i=0; $this_language_id = $languages_array[$i]['id']; $this_language_name = $languages_array[$i]['name']; $this_language_code = $languages_array[$i]['code']; $this_language_image = $languages_array[$i]['image']; $this_language_directory = $languages_array[$i]['directory']; echo " <tr>\n"; Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2003 Share Posted December 10, 2003 Seems that I like to post today... One detail, maybe somebody pointed it out already but I didnt see: allprods.php line 20, NAVBAR_TITLE must be used instead of HEADING_TITLE for the $breadcrumb. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2004 Share Posted January 19, 2004 This contribution is great. I made it so I can use A to Z listing (thanks to wizardsandwars :) ), but I can't figure out how to make it split results per page. Any help would be appreciated. You can view my page at http://www.naturalhealthland.com/catalog/allprods.php Thank you Quote Link to comment Share on other sites More sharing options...
Pixxi Posted January 19, 2004 Share Posted January 19, 2004 Hmmm ... is it a good idea to split the pages ... wouldn't that stop the spiders getting to page 2... 3... etc and indexing all of the products? Just a thought ... :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2004 Share Posted January 19, 2004 Spiders will follow links. I would like to do it to add functionality for customers. Quote Link to comment Share on other sites More sharing options...
ScooterProShop.com Posted January 20, 2004 Share Posted January 20, 2004 Any chance I can get a Play by Play of changes made in the ReadMe? 6). Replace or compare the files included in catalog/includes/boxes This is not helping me any, as I have numerous modifications already and have no idea how to do a file compare that would give me the accurate changes. Quote Scooterboy Link to comment Share on other sites More sharing options...
Guest Posted January 21, 2004 Share Posted January 21, 2004 How did you make it work with A-z listing? I am looking at doing this with the all products enhanced mod so im guessing it will be similar. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 21, 2004 Share Posted January 21, 2004 look at this thread Quote Link to comment Share on other sites More sharing options...
Guest Posted January 21, 2004 Share Posted January 21, 2004 Cheers for that, although I cant seem to get it working properly :( Quote Link to comment Share on other sites More sharing options...
Pixxi Posted January 22, 2004 Share Posted January 22, 2004 Spiders will follow links. I would like to do it to add functionality for customers. Yes, spiders will follow links, but if you split the listing into pages will you not have '<<previous -- next>>' buttons at the bottom of the page that have to be clicked before the next page is generated and displayed? Can spiders click those 'next page' buttons ...? If not, it seems an either/or situation: page it for use by the customers, or don't page it and get the spiders indexing all your stock. Just a thought ... anyone know for sure...? :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2004 Share Posted January 22, 2004 previous next buttons are links, therefore those links will be followed and spidered. Quote Link to comment Share on other sites More sharing options...
carpenoctem Posted March 19, 2004 Share Posted March 19, 2004 is there a way to make it so that the pictures of the items are also shown in the allprods.php page i am working on the site for an artist..... so the pics are necessary..... take a look at http://www.kenemmertdesigns.com/catalog/allprods.php Quote Link to comment Share on other sites More sharing options...
tammy507 Posted March 20, 2004 Share Posted March 20, 2004 All Products for osCommerce 2.2 Milestone 1 & 2version 3.0 by Ingo Malchow, [email protected] released under the GNU General Public License for the community of osCommerce Ok.. I am tring to install the above version of all products. Can someone explain to me what this means: 2. add the lines in: /catalog/includes/filenames.php /catalog/includes/languages/english.php /catalog/includes/languages/german.php into your files with the same path and name. Attention! Don't replace!!! Add only lines beginning with "define". Im a little lost. Add What line to these files? Can someone send me or post a set of clear instructions? Please. Thanks Tammy Quote Link to comment Share on other sites More sharing options...
Pixxi Posted March 20, 2004 Share Posted March 20, 2004 All Products for osCommerce 2.2 Milestone 1 & 2version 3.0 by Ingo Malchow, [email protected] released under the GNU General Public License for the community of osCommerce Ok.. I am tring to install the above version of all products. Can someone explain to me what this means: 2. add the lines in: /catalog/includes/filenames.php /catalog/includes/languages/english.php /catalog/includes/languages/german.php into your files with the same path and name. Attention! Don't replace!!! Add only lines beginning with "define". Im a little lost. Add What line to these files? Can someone send me or post a set of clear instructions? Please. Thanks Tammy If you take a look in each of those files you will find the line of code that needs to be added to the existing file of that name inside your catalog folder. For example, in filenames.php (in the mod) you will find: <?php /* add the following line in your catalog/includes/filenames.php */ define('FILENAME_ALL_PRODUCTS', 'all_products.php'); // all products and used categories ?> So you find /catalog/includes/filenames.php on your PC or server and add the line in the mod to the line(s) already in that file on your PC/server. eg. in the above example you would add the line: define('FILENAME_ALL_PRODUCTS', 'all_products.php'); // all products and used categories :rolleyes: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.