Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Enhancements, Thumbnails & Manufacturer Headings


spooks

Recommended Posts

Hi Sam, my site is heavely modified. What I need is only the modifications to products_new. I have read through your file and compared with the vanilla RC2a, but could not identify the modifications needed. Do you possibly have a file with where the changes are highlighted?

 

If not, could you please advice me on how to get the products in columns for products_new?

 

Kind regards

 

Sara

Link to comment
Share on other sites

  • 2 weeks later...

i have a problem.first sorry for my English. i have rc2a and i have Option Types v2 instaled. and i have Product Listing Enhancements, Thumbnails & Manufactur... instaled. my problem in product_list if i add a product; in SHOPPING CART without attributes.

in product_info.php is so:

//BOF - Zappo - Option Types v2 - ONE LINE - Initialize $number_of_uploads
   $number_of_uploads = 0;

   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
         <table border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
     //BOF - Zappo - Option Types v2 - Add extra Option Values to Query && Placed Options in new file: option_types.php
     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$product_info['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_order, popt.products_options_name");
     while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

       // - Zappo - Option Types v2 - Include option_types.php - Contains all Option Types, other than the original Drowpdown...
       include(DIR_WS_MODULES . 'option_types.php');

       if ($Default == true) {  // - Zappo - Option Types v2 - Default action is (standard) dropdown list. If something is not correctly set, we should always fall back to the standard.
           $products_options_array = array();
        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$ProdOpt_ID . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.products_options_sort_order");
       while ($products_options = tep_db_fetch_array($products_options_query)) {
         $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
         if ($products_options['options_values_price'] != '0') {
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
         }
       }

       if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
         $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
       } else {
         $selected_attribute = false;
       }
?>
            <tr>
             <td class="main"><?php echo $ProdOpt_Name . ':'; ?></td>
             <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $ProdOpt_ID . ']', $products_options_array, $selected_attribute) . '   ' . $ProdOpt_Comment;  ?></td>


          </tr><?php
     } // End if Default=true
 }
//EOF - Zappo - Option Types v2 - Add extra Option Values to Query && Placed Options in new file: option_types.php
?>

 

product_list:

function attribute_drop($products_id,$tax_class_id) {
   global $languages_id, $multi_add;
   $currencies = new currencies();
$atrib_drop = '';            
         $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
       $atrib_drop = '<table border="0" cellspacing="0" cellpadding="2" class="attributes">';

       $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$products_id . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
     while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
       $products_options_array = array();
       $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
       while ($products_options = tep_db_fetch_array($products_options_query)) {
         $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
         if ($products_options['options_values_price'] != '0') {
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($tax_class_id)) .') ';
         }
       }
$atrib_drop .= '<tr><td class="attributes" >' . $products_options_name['products_options_name'] . ':' . '</td><td align="left">' . tep_draw_pull_down_menu('id' . ($multi_add ? '['. $products_id .']' : '') . '[' . $products_options_name['products_options_id'] . ']', $products_options_array) . '</td></tr>';

     }
                       $atrib_drop .= '</table>';
   }
       return $atrib_drop;
   }
   // function attribute_drop end

Please help me. How can i make appropriate- Thanks

Link to comment
Share on other sites

I need help please

 

When I click on the Add to Cart button sometimes will product_info.php and

other times shopping_cart.php

 

And when I open the page in Internet Explorer 8 is going slow: (

 

Thanks for everything!

 

Magnificent contribution!

Link to comment
Share on other sites

Hi Sam, Very good effort on this contribution and many other from your side.

 

Looking for some help !

 

I Installed V2.8 on my oscommerc rc2a version and still getting issues with specials.php page (I have chosen Product Listing Style-thumbnails in grid in Product Listing from admin panel

 

root/specials.php page

This page appears fine but on top of this page it says

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ...../gift_shop/specials.php:3) in .../gift_shop/includes/functions/sessions.php on line 101

 

Now, on this very page when i click on BUY NOW button..the next page CRASHES and on top of it the page the message is

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ..../gift_shop/specials.php:3) in ..../gift_shop/includes/functions/sessions.php on line 101

 

Warning: Cannot modify header information - headers already sent by (output started at ..../gift_shop/specials.php:3) in ..../gift_shop/includes/functions/general.php on line 33

 

 

I think the issue is still with catalog/specials.php page because when i replaced it with V2.7 specials.php everything works file NO ERROR message but the whole shop becomes WIDE in appearance beyond my set limits, since i have the width set to 960px in CSS.

 

 

Your help would be appreciated, Thanks and advance.

Link to comment
Share on other sites

  • 2 weeks later...

Thank you for this wonderful contribution, works perfectly, but something happens

 

Took two days trying to fix bugs and have fixed some, others I can not

 

Can you help me a little favor?

 

Are the following, I think the base will be the same:

 

Error: Undefined index: sort

File: includes/modules/product_listing.php

Line: 27

 

Error: Undefined index: max

File: includes/modules/product_listing.php

Line: 28

 

Error: Undefined index: sort

File: includes/modules/product_listing.php

Line: 33

 

Line: 58

Error: Undefined index: manufacturers_id

File: includes/modules/product_listing.php

Line: 423

 

Error: Use of undefined constant mws_boxHeader - assumed 'mws_boxHeader'

File: includes/modules/product_listing.php

Line: 430

 

Error: Use of undefined constant TEXT_NO_PRODUCTS - assumed 'TEXT_NO_PRODUCTS'

File: includes/modules/product_listing.php

Line: 435

 

Error: Undefined index: short_desc

File: includes/modules/product_listing.php

Line: 487

 

Error: Undefined index: 54

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined variable: rating

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: specials_new_products_price

File: includes/modules/product_listing.php

Line: 157

 

Error: Undefined index: manufacturers_id

File: includes/modules/product_listing.php

Line: 492

 

Error: Undefined index: manufacturers_name

File: includes/modules/product_listing.php

Line: 492

 

Error: Undefined index: 52

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 97

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 85

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 78

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 45

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 66

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 99

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 65

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 105

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 36

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 67

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 50

File: includes/modules/product_listing.php

Line: 141

Error: Undefined index: 46

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 94

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 102

File: includes/modules/product_listing.php

Line: 141

 

Error: Undefined index: 38

File: includes/modules/product_listing.php

Line: 141

 

Thanks & thanks

Link to comment
Share on other sites

  • 1 month later...

Please could someone help me with the "Featured Products" modification supplied in the "Add on Pages" file?

I have installed the Featured Products contribution and it appears to be working fine. I have followed the instructions and replaced the "featured_products.php" in both the catalog folder and the catalog/includes/languages/english folder but the featured products being displayed have not changed. They are listed 3 per row but in the Product Listing under admin, I have selected 4 per row.

My product listing pages display 4 per row but the featured products are still as 3 per row with no borders going round.

I have installed the Bundled Products contribution and over written the files from the "Add on Pages" file and the Bundled Product page now shows the products as in the product listing - 4 per row with borders. But the featured products that displays on the main page displays 3 per row without border.

 

Can anyone help please?

 

Many thanks

 

Carl

Link to comment
Share on other sites

...

 

These can be found here: Modlue & Add-on Filesand although i had to make an amend to the module code for Featured Products it was a great starting point.

 

Thanks again for this great contribution

 

Matt

 

Matt, any chance of posting the code for the module you changed. I'm having a devil of a job solving the same problem you had. Thanks in advance. Russell.

Edited by brough
Link to comment
Share on other sites

  • 3 weeks later...

Hi!

 

Thank you for this contribution. I have a problem. I have installed v 1.8. I use the thumbnail setting in admin and it looks fine in Firefox, but in Chrome it does not. It is too much space between the thumbnails so the thumbnails cover a part of the menu to the left and the product titles is centered and not left aligned.

Link to comment
Share on other sites

This contribution looks great, but... I don't see the reason for giving us a product_listing.php file to replace the original, since all the other existing files you explain how to edit them piece by piece, because you acknowledge that most users have most likely modified the stock install ones. I did a mod to product_listing.php some time ago and I don't want to lose it, I'd rather have to manually edit it like I have to edit all the other files.

 

Could you please provide me with a list of what to edit?

 

Thanks.

Edited by here2learn
Link to comment
Share on other sites

  • 2 months later...

First off great work.

 

Here's my problem though, I almost have it all working how I want to but have noticed that in the attributes drop down on the product listing page it will only show a + price and not the total cost. I have it working correctly on my product info page.

 

Can any one suggest the code to use as the code used on my product info page doesnt work on the listing page.

 

Thanks in advance

Link to comment
Share on other sites

Have just seen this in the documents -

 

Price / Quantity Attributes

 

If a product has a zero price then the POA text will be displayed instead of zero and no add to cart (details button is shown instead) or quantity box will appear for it. If you use purely attributes for your pricing (not the best idea IMHO) then you need to modify the code to allow for that.

 

This would work for me too but I dont know what code i would need to modify.

 

HELP!

Link to comment
Share on other sites

i'd also like to have it show a light box of the image when you click on it instead of taking you to the product info page.

 

Any help on this would be much appreciated.

Link to comment
Share on other sites

  • 1 month later...
I installed the contribution "pure css button image swap". When I restore my backup, the Details button levels with the Buy Now. This contribution messed the thing up.

 

When I delete the _over image, the Details and Buy Now buttons level again.

 

This contribution uses the following code in html_output.php. Does someone what to change to correct this problem?

 

> html_output.php from Pure CSS Button Image Swap <

 

 

Has this ever been looked at? The amount the thumbnail buttons are knocked out of place is different on different browsers, eek.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

My apologies if this question has already been answered, but I can't seem to find the help I need.

Everything is working fine on my site except the products_new. The lightbox image is not displaying correctly.

My site is goodiesbox.com and it is the what's new link if you need to see what I am talking about. Please note though that my site does contain romantic accessories, so do not look if you would find the content offensive.

Any help would be appreciated!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hi

 

Can anyone assist me. I am getting this error when trying to import the .sql

 

SQL query:

{ \ rtf1 \ ansi \ ansicpg1252 \ deff0 \ deflang1031{ \ fonttbl{ \ f0 \ fswiss \ fcharset0 Arial;

MySQL said: b_help.png

#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 '{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fcharset0 Arial' at line 1

Link to comment
Share on other sites

  • 3 months later...

I want to stick the price in the box because when the description or the image is to large, it goes under the line.

 

Anyone knows how to fix it? I have attached and image with the issue.

 

Cheers!

post-307565-0-48489100-1330461857_thumb.png

Link to comment
Share on other sites

  • 3 weeks later...

Hi Spooks,

 

Welcome back to the forum.

 

There are is one thing that's been bouncing around SEO blogs in the last week that relates directly to this contribution: pagination.

 

http://searchengineland.com/implementing-pagination-attributes-correctly-for-google-114970

 

 

Is there any easy way to add rel="next" and rel="prev" to includes/functions/product_listing.php?

Link to comment
Share on other sites

@@longhorn1999

 

This is not something that's specific to this contribution & the code involved does not appear in it, its the split_page_results.php class (in includes/classes) and looking at the version from 2.3.1 the changes are easy:

 

Line 82.83:

 

// previous button - not displayed on first page
  if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>  ';

 

becomes

 

// previous button - not displayed on first page
  if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" rel="prev" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>  ';

 

line 100:

 

		  $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

 

becomes:

 

	  $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" ' . ($jump_to_page == $this->current_page_number-1 ? ' rel="prev"' : ($jump_to_page == $this->current_page_number+1 ? ' rel="next"' : '')) . ' title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

 

 

line 107,108:

 

// next button
  if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

becomes:

 

// next button
  if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" rel="next" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

 

Hopefully I didn't miss anything ;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

@@longhorn1999

 

This is not something that's specific to this contribution & the code involved does not appear in it, its the split_page_results.php class (in includes/classes) and looking at the version from 2.3.1 the changes are easy:

 

Line 82.83:

 

// previous button - not displayed on first page
  if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>  ';

 

becomes

 

// previous button - not displayed on first page
  if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" rel="prev" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>  ';

 

line 100:

 

		  $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

 

becomes:

 

	  $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" ' . ($jump_to_page == $this->current_page_number-1 ? ' rel="prev"' : ($jump_to_page == $this->current_page_number+1 ? ' rel="next"' : '')) . ' title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

 

 

line 107,108:

 

// next button
  if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

becomes:

 

// next button
  if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" rel="next" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

 

Hopefully I didn't miss anything ;)

 

Thanks Sam!

Link to comment
Share on other sites

Hi everyone,

I have installed this contribution, but i have a slight problem. I want to change the amont of boxes displayed and teh size of them but there is no controls in the admin panel to do it.

 

Anyone knows how to do this?

Find this post helpful? Click the 'Like this' button. :)

Link to comment
Share on other sites

Its hard to tell what your not doing, please say what display mode you have selected.

 

Have you read the section on usage in the docs, things like 'Product Listing Per Row'

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...