Closed (works as designed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Cart/checkout
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2010 at 00:31 UTC
Updated:
3 Mar 2015 at 14:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tr commentedOption ID is an internal Ubercart identifier, which is why I can say positively that option ID never has a dash.
Comment #2
mitchelljj commentedYou misunderstand using the example below
https://mydomain/cart/add/p110_a2o25-14-27-400-004
a2 represents the attribute name that is associated to the aid (attribute id) of 2 and
o25-14-27-400-004 represents the value that is assigned the attribute in the case it will be 25-14-27-400-004, but when sending this to the shopping cart via the add to cart url listed above only 25 is assigned to the attribute instead of 25-14-27-400-004.
Also having this same 25-14-27-400-004 value assigned to the attribute within the ubercart product page and then clicking on the add to cart button the entire value of the attribute (25-14-27-400-004) is assigned within the shopping cart unlike when clicking the add to cart link which only assigns 25 (which is the string before the first dash) to the attribute within the shopping cart.
Comment #3
tr commentedIt's easy to misunderstand when you don't explain your problem well. I'm changing the title to what I *think* you mean.
Comment #4
tr commentedThis should be fixed in 7.x-3.x first, then backported if necessary.
Comment #5
longwaveDashes are special characters in cart links, so the only way around this is to escape them. This patch supports escaping dashes with backslashes, so the example above becomes https://mydomain/cart/add/p110_a2o25\-14\-27\-400\-004
Comment #6
longwaveComment #7
longwaveI think this is such a minor problem that it can be ignored; there can't be many cases where attribute textfield options must contain dashes and can't use underscores instead. If this really is a problem for someone, feel free to revive this issue.
Comment #8
coderama commentedThis is a serious problem for me. I have a specific use case where I think cart links should be able to support "-". My product is a "domain name". A domain name has attributes: ID protection enabled, domain name, domain extension etc.
The domain name attribute has to be text for this to work. And it must support numbers, hyphens and letters. So for this specific scenario, I can't create add to cart links.