Closed (fixed)
Project:
UC Upsell
Version:
6.x-1.15
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Jul 2009 at 00:50 UTC
Updated:
15 Aug 2009 at 07:00 UTC
would it be possible to not have the related product attributes show up in the block, rather displaying as they are in the catalog view. I have some text entry attributes and it really makes the teaser look odd for a related product preview.
Comments
Comment #1
torgospizzaWell, the only issue here is that it would require you to use the Cart Links method of adding them to your cart instead. Either that, or you would just hide the entire Add to Cart form (and require users to click to the product instead). I'm not sure which is best, although I'm inclined to hiding the Add to Cart form - and if I do that, should it be a global option, or only switch if a product contains attributes? What do you think?
Comment #2
Rainman commentedWell for constancy's sake I would say make it global.. once again it would look odd to have some show up with the button and others not just as the occasional attribute looks odd now. Really I think not having the Add to Cart form would be preferred overall for myself anyhow.
Thanks!
Comment #3
torgospizzaI still need to focus on this. Hopefully in the next few days. Sorry for the delay.
Comment #4
Rainman commentedA question about moving to cart links method or hiding the form, would that change the List Price showing also (or be something configurable) I find that kinda odd looking too on my site anyhow, example: $0.00List Price: $1.00
Thanks!
Comment #5
torgospizzaNo, they are separate issues. The "List price" is part of the fields being displayed by your Store settings. Go to admin/store/settings/products/edit/fields and uncheck the List price field.
Comment #6
Rainman commentedWell I do want the List Price to show up in the product details, but not in the upsell block, just as with the product attributes. I guess what I am looking for is for the upsell block to look just like the product grid view in that regard.
Thanks!
Comment #7
torgospizzaHmmm. Okay. In that case you're probably better off just overriding the theme function. I don't think I can account for every product field that could ever exist - it should all use the same configuration settings. Look up overriding theme functions on drupal.org.. I can provide guidance for this particular model when you need it.
Comment #8
Rainman commentedOkay, began to look into overriding theme and looking into the code, it occurred that the List Price portion was very easy to remove.. I just removed the whole list price section from the uc_upsell.module:
Seems that part would be easy enough to just add another flag somewhere in the admin config to exclude it.. anyhow I am good on that one now.
digging deeper on the attributes, see what I come up with.
Comment #9
torgospizzaThe attributes are part of the add to cart form. So, I forget where it takes place, but I'm not 100% sure that's part of the theme function. I can't check right now but I can look into it later tonight. If it is in the theme function then you can simply remove it, or replace it with a cart link.
You know what, perhaps I will add the cart links back in as an option. This would alleviate this type of issue. It's not quite as elegant as keeping the Add to Cart buttons in there, but I think there has to be a compromise somewhere for this to work for everyone.
Comment #10
Rainman commentedAhhh.. ok now I see, if I remove the cart form part, the attributes go away also, this part:
now I also see that is themed, so hoping that can be tweaked to leave the Add to Cart but not the attributes
Comment #11
torgospizzaYeah exactly, the theme function for Upsell just themes the add to cart form, along with other elements. So you can do it that way. It's not the most user-friendly because you have to know how to override theme settings. I guess anything I can do to make it more intuitive for novice users would be a plus.
Comment #12
Rainman commentedWell you have my full support there, novice user would be me!:).. but trying to come up to speed. digging through ubercart, I think what would work would be using the simpler uc_catalog_buy_it_now_form, but I have no idea how to implement that in place of the theme('uc_product_add_to_cart'... either.
Comment #13
Rainman commentedAlrighty, I figured out how to change the form. at the bottom of uc_upsell.module the following lines:
are replaced with:
this is just exactly how I want it all to work (along with removing the List Price earlier).. maybe not for everyone, but I'm a happy camper now. Hopefully all this will be of use to someone else too.
Thanks for your guidance!
Comment #14
torgospizzaCool. Do you have a screenshot or a live site where I can see what that looks like? I'd like to implement this feature but won't know what I'm looking for without an example :) Thanks!
Comment #15
torgospizzaI tested this out in my local sandbox and it works great. I just committed to Dev a version that includes a new option (a checkbox that is Disabled - set to FALSE - by default) that allows you to use a Buy Now button instead of the usual Add to Cart. Please take a look once the Dev packaging script runs and let me know what you think.
Comment #16
Rainman commentedI tried installing latest dev, but received the following errors:
tried uninstall/reinstall, update.php manually selecting 6004, no love. looked into the install arguments for 6004 but couldn't figure, finally had to go back to my hack on the previous dev version.
edit: oh yeah the Buy Now option did not work ofcourse without the variable in the config.
Comment #17
torgospizzaWeird, well you should be able to check the checkbox, and hit Submit, and have it work. The variable gets set if it doesn't exist. I'll try to fix the update issue, though... not sure what would cause it.
Comment #18
Rainman commentedWell that was the first thing I did, of course! wanted to see that option working, but as I said no love.
Comment #19
torgospizzaOkay I think I got it. Open up the uc_upsell.install file and scroll to the bottom. Edit the last update_6004 function so that it looks like this:
Then you can go to update.php and run the update 6004 again. Let me know if that works.
Comment #20
torgospizzaReally, even that didn't work? Let me look at my sandbox site again.
Comment #21
Rainman commentedwhow wait.. think you have messages crossed. haven't tried that install change yet.
Comment #22
torgospizzaFYI I just tried my sandbox, and I got it working. I forgot to include the default during initial module install, though, but I don't think that's related to your problem.
I'll re-commit to Dev soon... let me know if you get it working on your end. If not I'll troubleshoot some more, but I no longer can reproduce the issue on my end.
Comment #23
torgospizzaYeah I meant to reply to the other one but there is no threading here in the Issue queue. I think once you try changing that code it should work. Failing that, you can unisntall the module and reinstall it, although that will destroy any of your Upsell settings (including any currently associated products).
Comment #24
Rainman commentedOK now you can go back to the sandbox. got rid of the install error but still Buy Now form not showing, it is using Add to Cart. wierd thing is the Buy Now checkbox sticks so seems that the variable is set.
Comment #25
torgospizzaWell it says Add to Cart - i copy-pasted the code that you gave me in your earlier comment - but do the Attributes show? They shouldn't. They don't on my sandbox.
Just FYI this is taken from uc_product.module's function ..
Comment #26
Rainman commentedYeah I meant The Add to Cart form with the attributes as opposed to Buy Now form without.
Comment #27
Rainman commentedI just got time to install the latest Dev. everything working, looks real nice and clean now, good work!:)
For anyone following this thread we ended up taking some troubleshooting offline as not to make this a chatboard and also my site was not public yet.. it is now, happily using this module! RainmanWeather Store, select any product to see it in action in all it's glory..
I still removed the "List Price" portion as I just wasn't happy with the way it looked and no amount of CSS tweaking was gonna fix it (I do have it displaying within the individual product pages).
removed portion from uc_upsell.module:
Comment #28
torgospizzaRemember that you don't have to hack the module to do this. You can copy the theme function from the module, and make it a theme override function in your template.php file. So instead of theme_pane_upsell or whatever it is, it would be THEMENAME_pane_upsell (i.e., zen_pane_upsell()) and then your theme function overrides the module's theme function. That way, when you upgrade to a new version of the Upsell module, your changes don't get blown away. :)