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.
   
 
Map custom customer data to weblog custom field
Posted: 01 October 2010 04:18 PM   [ Ignore ]
Is a Really Great Dancer
Avatar
RankRank
Total Posts:  83
Joined  2010-04-08

I’m using some custom customer data as described here and I need a way to save that information to the order entries in my database. Is that already an option? I didn’t see anything but I could have missed something.

I’m in a bit of a pinch and I’m already using the hook at the end of a order process so I just added the writing of the custom data to the DB manually in that extension for now.

What do you think about a CartThrob Custom Customer Info fieldtype similar to the CartThrob Order Items? That way the custom customer info could be accessible later as well.

 Signature 

-Erik Reagan
@ErikReagan

Profile
 
 
Posted: 01 October 2010 04:31 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRank
Total Posts:  3379
Joined  2009-05-29

If your custom data name has corresponds to a field name in your orders weblog, that data will get saved there. So if you’ve done:

<input type="text" name="custom_data[order_customer_pin_num]" value="" /> 

And you have a field called order_customer_pin_num in your orders weblog, it should get saved there.

Profile
 
 
Posted: 01 October 2010 04:36 PM   [ Ignore ]   [ # 2 ]
Is a Really Great Dancer
Avatar
RankRank
Total Posts:  83
Joined  2010-04-08

Yeah…..so…..

{exp:embarrassed}
  Next time I’ll try to read the documentation slightly better. Especially when I link to the information directly.
{/exp:embarrassed}

Thanks Rob!

 Signature 

-Erik Reagan
@ErikReagan

Profile
 
 
Posted: 15 December 2010 12:01 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRank
Total Posts:  352
Joined  2010-01-21

Is it possible to have the values of custom data returned as input values when you return to a page? For example, <input type=“text” name=“first_name” value=”{customer_first_name}”> outputs the first name in the input, but <input type=“text” name=“custom_data[field]” value=”{custom_data[field]}”> outputs {custom_data[field]}.

 Signature 

Freelance web designer & ExpressionEngine Pro Network developer

Profile
 
 
Posted: 15 December 2010 12:51 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

{custom_data[field]} should be: {custom_data:field}

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 15 December 2010 11:41 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRank
Total Posts:  352
Joined  2010-01-21

How do you make a custom_data field required? If I add custom_data[field] to the list of required fields, on the next page it tells me it’s required but not present.

 Signature 

Freelance web designer & ExpressionEngine Pro Network developer

Profile
 
 
Posted: 16 December 2010 01:19 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

I’m not sure if setting those to required is possible right now. I’ve asked Rob.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 16 December 2010 11:34 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRank
Total Posts:  3379
Joined  2009-05-29

Hey John, it’s not currently possible to add a custom data field to the list of required fields. We can consider it a feature request, though.

Profile
 
 
Posted: 16 December 2010 11:35 AM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRank
Total Posts:  352
Joined  2010-01-21

Sure, no probs.

 Signature 

Freelance web designer & ExpressionEngine Pro Network developer

Profile
 
 
Posted: 29 December 2010 07:40 PM   [ Ignore ]   [ # 9 ]
Has a Great Personality
Rank
Total Posts:  31
Joined  2010-04-08
Chris Newton - 15 December 2010 12:51 PM

{custom_data[field]} should be: {custom_data:field}

Chris, I’ve been trying to use this logic to update a checkbox within save_customer_info_form and customer_info forms. If the customer checks the box it’s a gift order. The form is correctly capturing the checkbox and I can output “on” with the {custom_data:gift_order} variable. However, my if statement always fails. Can this variable be used with comparison operators?

Here’s the code:

<p>
              <
input {if custom_data:gift_order == "on"}checked="yes"{if:else}checked="no"{/if} id="gift_order" name="custom_data[gift_order]" type="checkbox"  />
              <
label for="gift_order"><strong>This order is a gift</strong></label>
         </
p
Profile
 
 
Posted: 03 January 2011 11:17 PM   [ Ignore ]   [ # 10 ]
Has a Great Personality
Rank
Total Posts:  31
Joined  2010-04-08

Okay, nevermind. Figured it out with their weird syntax”

{if "{custom_data:gift_order}" == "y"}checked="yes"{/if} 
Profile
 
 
Posted: 03 January 2011 11:40 PM   [ Ignore ]   [ # 11 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

Good to hear. Sorry for the lack of response, weve been off for the holidays, and I’ve missed a few posts.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile