Jump to content
Sign in to follow this  
djmonkey1

Product Listing in Columns v2.0

Recommended Posts

Hi, I use your version dated october 18th, 2005, I think it is the version 2.1.

 

I solved the problem with the "buy now" icon. It turned out that it was the picture itself that was not sentered, so I made a new centered icon and now it works fine.

 

However, The attributes still do not show in the listing. I have checked, and they show in the product info page, but not in the listing. Wasn't they supposed to?

 

Also, the listing in columns works fine except for new products page. Here the listing is still vertical in one column. Do you have any idea why? I would very much like this page also to show the listing in three columns, like the others.

 

Here is a link to the new products page, so you can see what I mean:

 

http://www.kjolebutikken.com/oscdemo1/products_new.php

 

Please let me know if you know what to do to make it work on this page also.

Thank you so much:-)

 

Kjolebutikken

 

This contribution isn't a modification of products_new.php, it's a modification of the product_listing.php module used by index.php.

 

For attributes not showing up, I have no idea what could cause this.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Does somebody have the same problem? When I set a max. value for the "Search Results" the product listing shows 2 pages but two times the same products...

Share this post


Link to post
Share on other sites
Hi again, above not solved, but here is also a new problem that I just discovered. When I try to use the advanced search function, I get this error:

 

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 'by p.products_date_added desc limit 0, 20' at line 1

 

[TEP STOP]

 

This is not exactly like the one 1064 error described earlier in this thread, so I'm not sure how to solve this one.

 

I got it after installing this contribution, so I think it have something to do with this. Have I done something wrong? Can somebody help me a little here?

 

Thank you all so much:-)

Kjolebutikken

 

The problem you've described is not caused by this contribution. I'm willing to bet you're running PHP 4.1 and will find the solution by reading this thread.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Thanks, great contribution and easy to install! :thumbsup:

 

But just a small problem though. At the moment, I have set it so that each product is listed in a single column and under the image is the title of the product, the price then the buy now button. So my products are listed as follows:

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

I was wondering how hard would it be to have the title and the price on the same line (but in different columns) so it would look like this:

 

IMAGE

TITLE | PRICE

BUY NOW BUTTON

 

Can anyone help me?

Share this post


Link to post
Share on other sites

Hi

 

Just installed the contrib but have one problem.

 

When I go to the product category and see all the products, i can click on Buy Now and the product is added succesfully to the cart.

 

however, if I click on the image to see more details of the product, then click Buy Now, it adds the product to the cart twice (I emptied the cart before doing this so its not an additional one from the above point).

 

The only part of the code that I did not copy directly was within in /includes/application_top.php. I am using QTPro and this had previously added in some code there, so mine looks like

 

// customer adds a product from the products page

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

//++++ QT Pro: Begin Changed code

$attributes=array();

if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {

$attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);

foreach ($attrlist as $attr) {

list($oid, $oval)=explode('-',$attr);

if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)

$attributes[$oid]=$oval;

}

}

if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {

foreach ($HTTP_POST_VARS['id'] as $key=>$val) {

if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)

$attributes=$attributes + $HTTP_POST_VARS['id'];

}

}

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);

//++++ QT Pro: End Changed Code

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

case 'buy_now_form' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']);

// replace quantities $cart->get_quantity($HTTP_POST_VARS['products_id'])-($cart->get_quantity($HTTP_POST_VARS['products_id']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']);

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

// customer adds multiple products from the products_listing page

case 'add_multiple' :

while ( list( $key, $val ) = each( $HTTP_POST_VARS ) )

{

if (substr($key,0,11) == "Qty_ProdId_" || substr($key,0,11) == "Qty_NPrdId_")

{

$prodId = substr($key, 11);

$qty = $val;

if ($qty <= 0 ) continue;

if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {

// We have attributes

$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);

} else {

// No attributes

$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);

}

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

 

This may be unrelated but its the only thing I can think off. Appreciate any thoughts.

 

W

Share this post


Link to post
Share on other sites
When I set a max. value for the "Search Results" the product listing shows 2 pages but two times the same products...

 

Does nobody have an answer to my problem ?

 

THanks a lot !

Share this post


Link to post
Share on other sites

Hi

 

I am installing this for a second time but now that I am more awake, i have a query about step 3, /includes/classes/boxes.php

 

It says around line 39 look for:

 

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"';

 

I dont have this and I didnt think this was something I edited. Mine says

 

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

 

Being of the nervous type, I didnt want to just overwrite what I have. I guess I could try and if it doesnt work I have the back ups!!

 

Any ideas about this step?

 

S

Share this post


Link to post
Share on other sites
Hi

 

I am installing this for a second time but now that I am more awake, i have a query about step 3, /includes/classes/boxes.php

 

It says around line 39 look for:

 

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"';

 

I dont have this and I didnt think this was something I edited. Mine says

 

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

 

Being of the nervous type, I didnt want to just overwrite what I have. I guess I could try and if it doesnt work I have the back ups!!

 

Any ideas about this step?

 

S

 

Try it without doing that modification at all.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Thanks, great contribution and easy to install! :thumbsup:

 

But just a small problem though. At the moment, I have set it so that each product is listed in a single column and under the image is the title of the product, the price then the buy now button. So my products are listed as follows:

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

I was wondering how hard would it be to have the title and the price on the same line (but in different columns) so it would look like this:

 

IMAGE

TITLE | PRICE

BUY NOW BUTTON

 

Can anyone help me?

 

Can anyone help me with my problem? :blink:

Share this post


Link to post
Share on other sites
This contribution isn't a modification of products_new.php, it's a modification of the product_listing.php module used by index.php.

 

For attributes not showing up, I have no idea what could cause this.

 

Hi djmonkey1,

Have tried to find a contribution which does the same as yours for products_new.php, but I cannot find one. I like the product listing in column very much. Do you know of a way that I can get listing in columns also on this page? Maybe others who have installed your contribution also would like this? Here is a link to my products_new page to show you how the listing is today:

 

http://www.kjolebutikken.com/oscdemo1/products_new.php

 

Hope you can help me.

Thank you:-)

Kjolebutikken


Best regards

Kjolebutikken

Share this post


Link to post
Share on other sites

Hi

 

Is it possible to have different products being laid out differently. I have a range of products, a lot could be shown in a 3 column layout, but some are too wide so a 2 column layout would be more desirable.

 

Also, is it possible to include the first say 100 characters of the product description in with the Title, Price, Buy Now?

 

Thanks

 

W

Share this post


Link to post
Share on other sites

Hi guys... I've searched though the posts and haven't found an answer, so thought I'd ask...

 

I'm using the option type feature contribution, so that I can display some of my attrbutes with radio buttons and some with a drop down list. Does anyone know how to make this work with this contrib?

 

I'm also two other contribs that I'd like to make work with this one

- Remove prices, where prices (and buy now button) are not displayed if price=0, and

- Stock status in product listing, where, if stock =0, an 'out of stock' message appears and the 'buy now' button disspears.

 

Does anyone have any help?

 

Thanks,

~Barbara~

Share this post


Link to post
Share on other sites
Hi guys... I've searched though the posts and haven't found an answer, so thought I'd ask...

 

I'm using the option type feature contribution, so that I can display some of my attrbutes with radio buttons and some with a drop down list. Does anyone know how to make this work with this contrib?

 

I'm also two other contribs that I'd like to make work with this one

- Remove prices, where prices (and buy now button) are not displayed if price=0, and

- Stock status in product listing, where, if stock =0, an 'out of stock' message appears and the 'buy now' button disspears.

 

Does anyone have any help?

 

Thanks,

~Barbara~

Well, I've got the second two things happening (for now...), but I'm still stuck on the first one, trying to display the attributes with the radio buttons etc. Anyone with any ideas? I'm gunna keep trying to hack it...

~Barbara~

Share this post


Link to post
Share on other sites

Hello DJmonkey and others,

 

This question boils down to 'how to get the CSS property border-spacing to work on Internet Explorer'. You will find this property in the osC stock stylesheet.css for TABLE.productListing and enables you to space cells in a table. FireFox supports it, but Internet Explorer, still the major browser, does not.

 

Not such a problem, unless you add a border to TD.productListing-data. Every product cell in the normal and in the column listing - great job DJmonkey! - now has a nice solid/dashes/etc. border and border-spacing allows you to separate the cells that little further so every product cell has an individual border, except, you guessed it, in Explorer...

 

How to get around this? I have tried many things, including cellspacing for tables ('class="productListing-data" cellspacing="10"') but nothing gives me the desired effect in Explorer as in Firefox.

 

The only way around is, that I can think of, is to add an extra empty row below and column right of every product cell - with its own class since it should have no borders. I have not found a way to do this.

 

I would very much appreciate it if anyone could explain how to add an extra row and column for every single cell in the product listing. If anyone would know a better way to 'space borders', please feel free to let me know :) .

 

 

Thanks!!

Share this post


Link to post
Share on other sites

[see question in post 189 above]

 

A slightly simpler solution to the border spacing problem came to me in a dream :) . Why not embed every cell in a 'spacer cell' ? This is what I have done for the vanilla osC /catalog/specials.php which also has the products listed in columns:

 

<td align="center" class="cellspacer"><td align="center" width="33%" class="productListing-data" >.....   ....</td></td>

- the very first <td> element was added. And the following was added to stylesheet.css:

 

 

TD.cellspacer {padding: 5px;} TD.productListing-data {border: 0.1em dashed #000000; etc}

 

This has the same effect in Explorer as "border-spacing: 5px;" in FireFox!

 

 

Adapting product_listing_multi_col.php in the same way becomes too nasty for me and have tried hard.

 

.....
$product_contents[] = $lc_text; 
}
$lc_text = implode('<br>', $product_contents);
.....

 

In this case I believe that $product_contents needs to be wrapped in <td class="cellspacer"> ..... </td>

 

Anyone who could shed some light on how to do this? Any help would be very much appreciated.

 

Thanks

Edited by skylla

Share this post


Link to post
Share on other sites
Well, I've got the second two things happening (for now...), but I'm still stuck on the first one, trying to display the attributes with the radio buttons etc. Anyone with any ideas? I'm gunna keep trying to hack it...

~Barbara~

Please help me... I'm going round and round in circles - has anyone managed to get this contrib working with option type feature? In particular, I'm trying to display the attributes with radio buttons in the product listing. Any ideas on how to do this would be greatly appreciated.

 

~Barbara~

Share this post


Link to post
Share on other sites

:thumbsup:

 

I just update this wonderfull contribution to 2.2.

 

What's new?

- You can now set how many column to display in row from the admin instead hard coded in product_listing_col.php

- It will display the default product_listing.php if you set the number of column to 1

- add procentage width in td tag to make the column alignment display correctly

 

Happy Coding!


Adi Setiawan

Share this post


Link to post
Share on other sites
:thumbsup:

 

I just update this wonderfull contribution to 2.2.

 

What's new?

- You can now set how many column to display in row from the admin instead hard coded in product_listing_col.php

- It will display the default product_listing.php if you set the number of column to 1

- add procentage width in td tag to make the column alignment display correctly

 

Happy Coding!

Hi Adilovetini...

Is there any provision for displaying the attributes as radio buttons in the new release (as per my previous post)??

 

Thanks!

 

~Barbara~

Share this post


Link to post
Share on other sites
Thanks, great contribution and easy to install! :thumbsup:

 

But just a small problem though. At the moment, I have set it so that each product is listed in a single column and under the image is the title of the product, the price then the buy now button. So my products are listed as follows:

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

IMAGE

TITLE

PRICE

BUY NOW BUTTON

 

I was wondering how hard would it be to have the title and the price on the same line (but in different columns) so it would look like this:

 

IMAGE

TITLE | PRICE

BUY NOW BUTTON

 

Can anyone help me?

 

Anyone?? :blink:

Share this post


Link to post
Share on other sites
Hi djmonkey1,

Have tried to find a contribution which does the same as yours for products_new.php, but I cannot find one. I like the product listing in column very much. Do you know of a way that I can get listing in columns also on this page? Maybe others who have installed your contribution also would like this? Here is a link to my products_new page to show you how the listing is today:

 

http://www.kjolebutikken.com/oscdemo1/products_new.php

 

Hope you can help me.

Thank you:-)

Kjolebutikken

 

 

Hi, can anyone help?

I still have not figured out how to get the listing of new products, the page products_new.php, listed in columns. This contribution works only on the categories and on specials on my page.

Hope someone out there can tell me:-)

Thanks.

 

Kjolebutikken


Best regards

Kjolebutikken

Share this post


Link to post
Share on other sites

Sjaak,

border spacing problem
Would this work (haven't tried it):

<td align="center" width="33%" class="productListing-data" style="padding-right: 10px;">.....   ....</td>

Share this post


Link to post
Share on other sites

Thanks Jan for looking into this. I have now found out why extra styles for the table in productListing-data are not working: they are overridden by the style classes code in includes/classes/boxes.php. Since CSS borderspacing won't work for IE, I have now managed to get the more generic HTML cellspacing for product box contents to work for column product listing exclusively. If you want to achieve a similar effect let me know and I will post the code on this forum.

 

Barbara, Michael and Kjolebutikken, I see what I can do, but it might take some time.

 

Kurt, have you resolved your problem?

Share this post


Link to post
Share on other sites

Hi,

 

I use 3 columns on my site. The products are sorted by name. How can I change the sort order to "added by date"? -So the newest products show first when entering a category.

 

Sincerly

Webtytte

Share this post


Link to post
Share on other sites

Hi, just a quick question:

 

If force cookies is set to false and I turn off my cookies in my browser, the buy it now button in the product listing does not work. It shows up with an empty cart.

 

However in product info, the add to cart button works perfectly.

 

Has anyone else experienced this, or care to comment?

 

Regards,

 

Peter A. Piliouras


Full-time I am the COO of a large retail company in Australia.

In my spare time (what little I have), I enjoy buying, selling, and trading ancient coins and antiquities as a hobby: https://www.ancientcointraders.com.

I am enjoying learning about web-design.

 

osCommerce responsive is the best version of osCommerce.

Download it here: https://github.com/gburton/Responsive-osCommerce

Please donate so the team can continue their work on that project: https://pledgie.com/campaigns/31724

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×