Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
Purchased Items with same exact URL title
Posted: 10 July 2012 07:38 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  23
Joined  2010-06-10

I have this very weird problem, where some of my purchased items entries have the same exact URL Title as others.

The site is set up where a event participant gets sponsors to participant in a fundraising event. So the sponsor (customer) is purchasing a sponsorship that is credited to the participant. And the “purchased item” is on the fly, set up as “Participant sponsorship of firstname lastname in event name 2012” and the URL title, it seems if there are more than one sponsorships, comes out as “sponsorship-of-participant-firstname-lastname-in-event-2012das”

What it HAD been doing, was adding a number of the end of the 2012 - as expected with EE. Some other entries are that way. 20121, 20122, 20123, and so forth. In one case there was a 2012dash4 and I fixed that manually (removing the word dash) and all was fine. But clearly there is something weird happening.

Profile
 
 
Posted: 10 July 2012 06:12 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10241
Joined  2008-09-29

URL titles by default can only be so long. I bet you’re bumping up against the url_title max length, and it’s basically just crapping out. We dealt with something similar when we originally built safecracker. I think in SafeCracker’s case we found some way of working around EE’s limitation there.

I’ll ask Rob.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 12 July 2012 12:06 PM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  23
Joined  2010-06-10

I bet that’s it, I didn’t think about that! I made some changes and I’ll see if it helps. Thanks!

Profile
 
 
Posted: 31 July 2012 09:18 AM   [ Ignore ]   [ # 3 ]
Wallflower
Rank
Total Posts:  23
Joined  2010-06-10

With your help, I identified this problem. I changed the title of the on_the_fly products in order to produce shorter url_titles, but it’s not. It’s almost like the add to cart form isn’t even seeing that new title, and it’s going by the old.

Here is the new template tag:

{exp:cartthrob:add_to_cart_form no_shipping="yes" return="cart/index" on_the_fly="y" title="Sponsor {title} in Lake Swim {event_year}" allow_user_price="yes" id="sponsor_participant_form" status="open"

And the old one had a title of title=“Sponsorship of {title} in Canandaigua Lake Swim {event_year}”. I can’t figure out why this is happening!

Profile
 
 
Posted: 31 July 2012 11:43 AM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10241
Joined  2008-09-29

Changing that title, won’t change existing purchased item’s URL titles. It will only apply to new items purchased.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 02 August 2012 09:50 AM   [ Ignore ]   [ # 5 ]
Wallflower
Rank
Total Posts:  23
Joined  2010-06-10

I understand that. What I’m saying is, it’s not setting the title of the on_the_fly product to what I have for title=”“. I have title=“Sponsor {title} in Lake Swim {event_year}”. It’s creating products called “Sponsorship of {title} in Canandaigua Lake Swim {event_year}” which is too long for the title_urls for some participant’s names.

Profile
 
 
Posted: 02 August 2012 11:28 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10241
Joined  2008-09-29

I looked up in EE’s code, and oddly enough it’s own url_title generator doesn’t set a length anywhere in the system until it gets to a protected function that has a note that says something like “url titles can only be 75 characters long so we trim it here”. So looks like we’ll have to mimic that functionality ourselves.

In the purchased items model, around line 163 in the create_purchased_item function there’s a line:

'url_title' => url_title($title$word_separatorTRUE).$word_separator.uniqid(NULLTRUE), 

 

change it to

'url_title' => url_title(substr($title035), $word_separatorTRUE).$word_separator.uniqid(NULLTRUE), 

 

That will trim the title down enough for the dynamic part to get tacked on to the end so that all url_titles are unique.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 02 August 2012 12:23 PM   [ Ignore ]   [ # 7 ]
Wallflower
Rank
Total Posts:  23
Joined  2010-06-10

Ok I’ll try that. That doesn’t answer my question though, of why the title isn’t setting the title of the purchased item the way I have it set to.

Profile
 
 
Posted: 02 August 2012 01:08 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10241
Joined  2008-09-29

I’d suggest starting with a new browser and a new session. Try adding the items in again. I have a suspicion… adding items in a new browser while logged out may confirm it if it starts working correctly.

Add {exp:cartthrob:debug_info} to the bottom of any page if you want to see what’s getting stored in the cart… that will help too.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile