Jump to content
Sign in to follow this  
mouflon

[Contribution] Attributes in Product Listing

Recommended Posts

Adds a column to allow attributes to show in the product listing, as well as allow quantity entries from the listing as well. Currently, it's an all-or-nothing affair. Next version will include a toggle to use the Buy Now button for each item in the listing or the Add to Cart Button at the bottom of the listing..

 

http://www.oscommerce.com/community/contributions,1098


Unexpect the Expected

Share this post


Link to post
Share on other sites

There are two lines in application_top.php that add the product to the cart. One is commented, the other isn't. Uncomment the one you want, depending on whether you want to increment the quantity of items in the cart, or overwrite the quantity in the cart.


Unexpect the Expected

Share this post


Link to post
Share on other sites

It seems I had a bit of leftover code from a modificatio I dis for someone else. If you use the entire listing, you will have to make a minor change:

Replace the PRODUCT_LIST_NAME section.

 

The code is correct in the install text.

 

         case 'PRODUCT_LIST_NAME':

           $lc_align = '';

           $lc_valign = 'top'; 

           if (isset($HTTP_GET_VARS['manufacturers_id'])) {

             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . $cID . ' </a>';

           } else {

             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' </a> ';

           }

           break;


Unexpect the Expected

Share this post


Link to post
Share on other sites

Thank you Jeff

This is just what I needed, I am not very good at php and I am trying to get it to work with the "Short descriptions in product listing" hack and a buy me button next to each product as well as at the bottom of the page.

 

I will let you know how I get on :D


Best wishes

Steve

Share this post


Link to post
Share on other sites

You won't be able to have the button at the bottom of the page and also have a Buy Now button (and still pick up the attributes). That would set up a nested forms scenario that just wouldn't work.

 

No problem though, having either one or the other. Just install the contrib as is, then replace your Buy Now code in product_listing.php as outlined in this thread:

 

http://forums.oscommerce.com/viewtopic.php?t=38536

 

Make sure that you only have one or the other selected in the Product Listing options in Admin.

 

I will be packaging it all up together as an update to the contribution, but I'm looking a couple of other enhancements, so it will be a couple of days....


Unexpect the Expected

Share this post


Link to post
Share on other sites

I have this installed and I am very happy with it - thank you very much!!

 

One question though - is it possible to replace the grey "Add to cart" button with an image so that it is consistent with the rest of the site?

 

My image is button_in_cart.gif and the code which calls the grey button is:

 

<td  align="right" colspan="<?php echo $colspan; ?>"><input type="submit" align="absmiddle" value="Add To Cart" id="submit1" name="submit1" Class="SubmitBtn"></form></td>

 

Has anyone managed to replace it with an image and if, what did you do? I have tried a few things but nothing has worked so far.


Questions not being answered? mecry.gif

Try here first:

Search | Help documents

Share this post


Link to post
Share on other sites
You won't be able to have the button at the bottom of the page and also have a Buy Now button (and still pick up the attributes). That would set up a nested forms scenario that just wouldn't work.

 

Well, thanks for the info - that`s something I was just about to ask...

Too bad though that it wouldn`t work because that would be great imho.

 

No problem though, having either one or the other. Just install the contrib as is, then replace your Buy Now code in product_listing.php as outlined in this thread:

http://forums.oscommerce.com/viewtopic.php?t=38536

Make sure that you only have one or the other selected in the Product Listing options in Admin.

 

Though there is one thing that wouldn`t work: While I can "Buy now" form the listing

I cannot "add to cart" in the indivudal product view. Is it just like that or did I make

a mistake? I guess I made a mistake (which?) but if not and it is just like that I`d

like to turn of the individual product view and make every link (like from "Bestsellers"

jump right into a list like display of the product.

Help would be much appriciated, here is the current versions:

http://www.kunstgewerbe-muecke.de

 

Thanks!

Ken

Share this post


Link to post
Share on other sites

Hi,

 

odes anyone managed it to show the complete or better actual attribute price in the product listing ?

 

I installed the actual attribute price and in the product info and it works.

 

But now i need the price +attributes price in the attributes dropdown box in the productlisting.

 

Any help ?

 

Thanks and best regards

 

Niels

Share this post


Link to post
Share on other sites
I have this installed and I am very happy with it - thank you very much!!

 

One question though - is it possible to replace the grey "Add to cart" button with an image so that it is consistent with the rest of the site?

 

My image is button_in_cart.gif and the code which calls the grey button is:

 

<td  align="right" colspan="<?php echo $colspan; ?>"><input type="submit" align="absmiddle" value="Add To Cart" id="submit1" name="submit1" Class="SubmitBtn"></form></td>

 

Has anyone managed to replace it with an image and if, what did you do? I have tried a few things but nothing has worked so far.

 

 

(do at your own risk)

you shoud go to the path catalog/includes/languages/english/images/buttons/ in this folder button add to cart is prsent rename your image with the name of button add to cart which is given in folder and replace existing add to cart buttons image with your own for other languages do the same (http://5wholesale.com/-p-93.html) see this site i have done the same

 

 

best of luck

Edited by vinayak_genius86

Share this post


Link to post
Share on other sites

I have installed this contrib and it is great!

 

One feature request, or even code help though:

 

I'd like the possibility of switching the contrib on and off by category, instead of globally. So for one category you could have 1 add to cart button for all products within, then for another you could have individual buy it buttons for each product within, then for yet another you could show default product listing.

 

Does anyone have any idea of how I could do this? where to start looking, etc?


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

Sorry for the double post. I asked this question in general support with no response.

 

I am a little confused about the install of this mod. I have everything done except the SQL, which I dont understand.

 

The install instructions state:

 

"Be careful with this one."

If you have made changes to your configuration table, the "11" for sort_order

will have to changed depending on the last item with the configuration_group_id of "8"

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());

 

I have mad some changes to my database.

 

How do I know if i need to change the "11" or not, depending on the last item with configuration_group_id of "8".

 

Can someone please help me with this. I do not know if i need to change the number or not.

 

Thank you

beth

Share this post


Link to post
Share on other sites

SQL statement - Help please!

 

How do you know if you need to change the "11" or not, depending on "8"?

 

Someone, Please Help!

Share this post


Link to post
Share on other sites

Did anybody ever work out what this guy meant in the instruction:

 

//-----------------------------------------------------------------------------------------------------------

// 1. Database Config

//-----------------------------------------------------------------------------------------------------------

 

Be careful with this one.

If you have made changed to your configuration table, the "11" for sort_order

will have to changedepending on the last item with the configuration_group_id of "8"

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());

//-----------------------------------------------------------------------------------------------------------

 

I'm going to try out this contribution with the default SQL insert, but i know my config has been changed so it might not work?

 

I dont understand the interdependant change he requires we make.

 

Kind Regards

 

Jeremy

Share this post


Link to post
Share on other sites

Thanks! This works great!

 

However, i have a question:

I've also added another contribution: "actual price in pull down_1_2_3a"

it's simple yet let you show the price alone with the attributes. it workded on the product_info page, i guess it has nothing to do with the product list.

I was wondering if anybody use it as well, or suggest anyother way to show the total price(not "+$20") in the attribute list on product list page?

 

Truly appreciated!

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  

×