7 replies [Last post]
RCWebmistress's picture
Offline
Joined: 09/19/2011
Juice: 55
Was this information Helpful?

Hello

Im a Drupal themer looking to streamline the process in which people can view and add products to the cart. While it is my belief that people should click on a product and read all of the info before buying something, I still see need to have the "add to cart" section on listing pages be more elaborate than it is "out of the box".

Im attaching an illustration that may better explain what I need, in case. Basically, Id want the attributes (options) dropdown seen on individual product pages to be present on the product listing page as well. Then, if they already are familiar with this product and just want to proceed to filling their cart, than they can do so. Below the product attributes dropdown woudl be the "add to cart" button. This is because my products require an option to be selected before they would be able to add it to their cart (we need to know how many years of a sub that they want it for).

Any suggestions if this kind of modification needs to be done via the views backend or hard coded into the tpl.php of that view?

PreviewAttachmentSize
replacewithattributedropdown.jpgreplacewithattributedropdown.jpg43.35 KB
RCWebmistress's picture
Offline
Joined: 09/19/2011
Juice: 55
Update: Store Configuration but can only turn button off

Upon further look, I noticed that sites/all/modules/ubercart/uc_product/uc_product.module file has the table that is built when viewing a list of products under a certain taxonomy term. Its possible to take that file and refashion it in template.php. However, I also tried to see if the backend had any other options I had overlooked. Through Store Configuration> Product Settings>Product Fields, I can see a place to manage which fields get shown. I can hide the "Please Choose An Option" for now, as it still would be confusing and create extra steps for browsing customers. Simply put, this option screen for these fields still doesnt seem to have a way to utilize the attributes that are required (and already set up) for all my products.

Any ideas how I can further tweak this display?

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3230
Re: Update: Store Configuration but can only turn button off

As I told you in IRC, what you show in your image is NOT core Ubercart - it's generated by some other module you haven't identified for us. If you want to change that behaviour, you will have to ask in the issue queue for whatever module you're using.

<tr>.
RCWebmistress's picture
Offline
Joined: 09/19/2011
Juice: 55
Re: Re: Update: Store Configuration but can only turn button off

TR> I did hear your comment back to me on that and I did answer to you that it is controlled in UC Catalog. The pages where this "Please Choose an option" show up is on the catalog listing pages. Here is a screencap of the ubercart catalog page field management. You will see that there is no place to add a field of your own. I can only make the "Please Choose An Option" (which shows up instead of a button reading "Add to Cart") disappear by clicking it off in this menu: admin/store/settings/products/edit/fields

UC Catalog seems to be part of Ubercart (core--optional) so that is why I am writing about this here. However, I have followed other people's suggestion of posting this to the drupal.org forums also.

AttachmentSize
productfieldoptions.jpg 173.19 KB
TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3230
Re: Re: Re: Update: Store Configuration but can only turn button

Yes, uc_catalog is part of core. uc_catalog DOES NOT display the attribute select box, nor does it display "Please choose an option". This is NOT done by ANYTHING in Ubercart, it is done by some unknown contributed module you're using on your site, as I said.

<tr>.
RCWebmistress's picture
Offline
Joined: 09/19/2011
Juice: 55
Re: Re: Re: Re: Update: Store Configuration but can only turn bu

Please understand. I am agreeing with you that it is not in Ubercart Core which is creating the text in that submit button. ** I found out that it is Ajax Cart which does that.**, as mentioned before.

But regardless of that, I still need to find a way to tweak the catalog table (tapir?) to create that extra attributes dropdown field. I can always disable the Ajax Cart module to change the button back to read "Add to Cart". At this point, Im ready to throw in the towel or find a way to override all of this with a view that can override all catalog pages. It is said that it is possible, but I cant find any further info that might help me figure out the exact settings for that view to work with the paths /store/TERM/TERM...

RCWebmistress's picture
Offline
Joined: 09/19/2011
Juice: 55
Re: Re: Update: Store Configuration but can only turn button off

It looks like it might be UC Ajax Cart that makes that "Please Choose An Option", but it still comes down to finding thsi darn table and editing it. Why? Because when I disabled UC Cart, the "Add to Cart" button replaces "Please Choose an Option", but still Im stuck with no way of further customizing that table overall so I can get the dropdown attribute in there. (see attached image)

AttachmentSize
ubercartaddtocartstillnowaytoedit.jpg 11.37 KB
infowonders's picture
Offline
Joined: 09/27/2009
Juice: 7
Re: Re: Re: Update: Store Configuration but can only turn button

Are you working on Drupal 6, or Drupal 7?