Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can someone do this?


agiftcodotcom

Recommended Posts

Anyone up for the challenge of helping me with a contribution?

 

I have 1000+ items currently on my web site. The items I have, some of my guests would probably like to see them in a "catalog" type of view. Can anyone create a script that will take up the whole page (no right or left column) and have about 50 thumbnails or so (5 rows of 10?) and have "next page/previous page" navigation buttons to "flip" between pages? The items would be listed just as they are under "What's new for ??" or the "Featured Products" contribution, with a thumbnail, item name and price.

 

Can anyone make this happen? I think many of us could use an old fashioned "catalog" type of view. Some guests like to be able to "browse" through a "catalog".

 

I hope this makes sense. I'm not good enough yet to do this,or I would. Any help is greatly appreciated.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

just use the all product contrib and take of the calls to the left and right column. Change the max view to 50 instead of the default and your all set. go to my page, and click view all products at the very top right to see what it looks like.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

thats the same as I have. I also have the product listings contrib so that all my product listings show up in three columns. Since I have that installed allprods.php will show up in three columns.

 

Your gonna have to install that first, then if you don't want your products displaying in three columns, there is a if statement in product_listing.php that is:

$column ++;
? ? ?if ($column >= 3) {
? ? ? ?$row ++;
? ? ? ?$column = 0;

you could change it to something like this:

$column ++;
? ? ?if ($column >= $num_col) {
? ? ? ?$row ++;
? ? ? ?$column = 0;

 

then somewhere near the top of product_listing add this:

if ($allprods) {
$num_col = 5;
} else {
$num_col = 1 //or how ever many columns you want
}
$allprods = false //this turns it off for all other product_listings

then in allprods.php add a line somewhere near the top: $allprods = true;

 

that should work I hope.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Well, I tried it, but not only does it not work, but now when I try to select a category, I get...

 

 

 

Categories

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 'and c.parent_id = '1' and c.categories_id = cd.categories_id an

 

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where and c.parent_id = '1' and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_order, cd.categories_name

 

 

 

 

This is one my Test Site

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

categories_description cd where and

 

should this not be

 

categories_description cd where

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

in your post above

Categories

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 'and c.parent_id = '1' and c.categories_id = cd.categories_id an

 

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where and c.parent_id = '1' and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_order, cd.categories_name

 

which page are you seeing the error message initially, could it be from the file that you were just editing

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

have a look at your catalog/includes/boxes/categories.php I think this is the one

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

you may be able to search using this

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from

 

how is that for timed posting

 

I had not looked at that side of things

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Let me try this another way, since I know I have this page working. Is it possible to make a view like This appear with multiple columns? So I could have 3 or 4 columns of 10/15 products that appear at once?

 

 

Here is the code for that page...

 

<?php 
/* 
 $Id: allprods.php,v 2.0 2004/01/13 20:28:47 UJP Co. Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2004 osCommerce

 Released under the GNU General Public License
 
*/ 

 require('includes/application_top.php'); 
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLPRODS); 

 $breadcrumb->add(HEADING_TITLE, tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL')); 
?> 
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html <?php echo HTML_PARAMS; ?>> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE ?></title> 
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> 
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script type="text/javascript" language="javascript" src="rollovers.js"></script>
</head> 
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> 
<!-- header //--> 
<?php require(DIR_WS_INCLUDES . 'header.php'); ?> 
<!-- header_eof //--> 

<!-- body //--> 
<table border="0" width="100%" cellspacing="3" cellpadding="3"> 
 <tr> 
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> 
<!-- left_navigation //--> 
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> 
<!-- left_navigation_eof //--> 
   </table></td> 
<!-- body_text //--> 
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td>
<?php
 // create column list
 $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                      'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                      'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 
                      'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                      'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                      'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                      'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                      'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
 asort($define_list);

 $column_list = array();
 reset($define_list);
 while (list($column, $value) = each($define_list)) {
   if ($value) $column_list[] = $column;
 }

 $select_column_list = '';

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
   if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_NAME') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
     continue;
   }
 }
 
 $listing_sql = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' order by p.products_price, pd.products_name";
 include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>
       </td>
     </tr>
   </table></td>
<!-- body_text_eof //-->

 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

I'll come back to that one.

what code are you using in the categories box for your allproducts

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

in the admin switch allproducts to true

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

did you download the contrib I told you about? I don't know how do it without that contrib.

 

The contrib

 

It looks like an easy install. Then just do the changes I told you about earlier.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

yeah, by adding the code that I wrote before using the if statement and the other stuff. That should change it to 5 columns for allprods and 1 or however many for any others

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

hmm, I just tried it and if you put one column it will look funny. I guess you will have to have an if else statement with the original product listings in the if and the new product listings in the else then just add the $allproducts = true to turn it on and $allproducts = false to turn it off like I mentioned before.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Well, I tried installing Ryan's contribution as well as the AllProds, and they don't work in conjunction. My normal categories can be viewed in columns now, but not the All Products links. I guess I will have to see if I can figure out how to make that work.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...