Hi and thanks for the module! Not sure if it's a bug, but is it possible to add support for options and attributes? While editing the product I can only select related main products, not the sub-products which have different SKUs.
Following the "Buy now $xx.yy" link I can add the main product to the shopping cart without the size option, even if it's marked as required.
I've managed to work around that by not displaying the buy link with CSS.

Cheers

Comments

torgospizza’s picture

Status: Active » Postponed

Glad you like the module! Yours is a good idea, and one that should be looked into. However there is another way to solve your "add to cart without the option" issue - check out the issue I created un ubercart.org here: http://www.ubercart.org/issue/3664/cart_links_does_not_honor_required_at...

There are a couple patches you can try, the change is really pretty minimal to allow for the Cart Links to work correctly with Upsell. The only other option would be for me to break down each individual option/attribute combination, or instead to theme the link as a "More info.." link that takes you to the product, rather than a Buy now button or link. That's something I can definitely think about for the next release. (I'll mark this as postponed so I can remember to come back to it.)

gaijinu’s picture

I see, thanks for the link. So it's the cart links which bypasses the options/attributes. Yeah, it doesn't make sense for you to combine all the possibilities, on a big site can be a headache. Also I wouldn't want to recommend a really small pair of shorts to a guy who just bought a pair of really big gloves :-)

Cheers again!

torgospizza’s picture

Yeah, I think the best option here would be a configuration setting which allows you to use either Cart Links or perhaps the normal cart Add to Cart button. (Unfortunately, those form fields can get kind of long..) At this point I'm not 100% sure. It's either that, or a setting which makes the Buy Now link a More Info link and just directs the shopper to the productpage.

The thing I didn't realize is that Upsell assumes your attribute and cart links module have been patched to restrict the required attributes. I'll have to press Lyle for putting that change into Core.

torgospizza’s picture

Category: bug » feature
RikiB’s picture

I could also use an attribute solution. Is there a quick way to remove the buy it now and just have it as a link to the product page?

torgospizza’s picture

Well, you could comment out the bits of code that add the buy it now link... right now the most flexible way is to make sure you are using Cart Links, and make sure any product that has attributes, has it as a "Required" attribute - that way user's can't add it to the cart without first selecting one.

I can look into the attribute selection system again and see if I can't modify my form values for that.

gaijinu’s picture

Or add this in your style.css until it gets sorted out.

a.buy-related-item-buynow {
display:none;
}
j0rd’s picture

Great module btw. I just installed this for the first time today and have been playing around with it. I love it. Thank you for your hard work on this. I also like how you've put entry points into all the configuration pages from the main configuration page. This will help me a tonne with less drupal savvy clients. I wish more module creators did this as Drupal administration can even be confusing for me.

With that said, my only issue with it, is the cart-links / attributes issue. There's no good way to resolve this issue & keep the related product block items clean and minimal.

What I've done in the past, where my client required the "Buy It Now" link on the product listings, but since they were tiny I couldn't include the options. What I did was to include the buy it now, and set all the default attributes/options to nothing. WHen the customer clicked on it (and the product had options) it would redirect them to the product page with and error telling them to choose their required options. I feel this is a good way to go, since not all products have options...those get added directly to cart...and if they do have options, the user has clicked on it already (so their interested/upSOLD)...and then simply have to choose the options of their choice and add to cart again.

Perhaps removing the Cart Links and changing it to a "BUY IT NOW" form/submit button would do this.

torgospizza’s picture

Thanks for the kind words, j0rd. One thing I have on my todo list is to remove the Cart Links support and instead show the themed Add to Cart form. That would allow attributes to be displayed as they would in any other product add to cart form - with a select list, radio buttons, etc.

Thoughts? (I think this would actually be a fairly simple patch..)

torgospizza’s picture

Also... it looks like attribute support is in the way I thought it would be. The dev version now includes Add to Cart forms instead of Cart Links. I think right now that is just the only way to include it, but perhaps I'll make that the default and add an option to show them as Links instead.

torgospizza’s picture

Status: Postponed » Fixed
torgospizza’s picture

Marking this as fixed although it's really not, at least not for 5.x. If someone wants to post a bounty for backporting this functionality to 5.x from 6.x I will consider it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

j0rd’s picture

@torgosPizza.

I've found for a couple projects I've worked on, which have "Buy It Now" type links....sometimes it's best if the attributes are not shown. This trade off is usually done on my sites for design aesthetics. I've found that for maybe 70% of my products, there are no attributes and for the other 30% there are attributes. For those 30% with attributes, once purchased I fail and redirect the user to the product page, with the proper errors telling them to choose attributes and try again.

The way you've changed it is much better than having to use cart_links, so I appreciate the work.

As I've done before, I can probably still provide my "fail on lack of attribute" method by using form_alter and changing the options to $form['option']['#type'] = 'hidden'; // or 'value'; which will leave them to their defaults and make the submission fail.

No need to change anything, just wanted to let other people know what they can do if needed.

torgospizza’s picture

Version: 5.x-1.7 » 6.x-1.x-dev
Assigned: Unassigned » torgospizza
Status: Closed (fixed) » Active

After discussing things with John over at Acquia, I think I'm going to reopen this.

Since right now the D6 version of Upsell allows the entire Add to Cart form, which includes attribute selection, the ability to have a separate Related Products list for a per-product-attribute selection would be a good step forward.

For example, selling a hard drive that comes in SATA or IDE might include cables belonging to SATA and IDE varieties. This is more of a "Related accessories" type system which would be a huge boon for shops looking to sell accessories to their products.

Thanks for the idea, John!

torgospizza’s picture

Title: Attribute support » Accessories and attribute support
torgospizza’s picture

StatusFileSize
new47.87 KB

Just added the functionality (in my local test site) to allow for multiple Upsell products to be added along with the currently viewed product. Might introduce an option (or an additional submit button) to make this optional. Maybe I should also include the Add to Cart Button just in case...?

Check out the screenshot to see it in action.

torgospizza’s picture

Feedback on that functionality is most definitely appreciated. There are more tweaks I could add to it but it works great so far on my local dev.

Next steps:

1) Restrict "relate by taxonomy" settings to a specific term or vocab.
2) Multiple blocks
3) In the "Content Type > Product" etc. form, allow a select list of OTHER node types that could be used as "Accessories"
4) AJAX / AHAH?

Perhaps all of this functionality should be split up into an "Accessories Mode" for the Upsell module? Thoughts?

torgospizza’s picture

Version: 6.x-1.x-dev » 6.x-2.0

Marking this as part of my TODO list for 2.x