Forum Replies Created
-
Hi.
You checked the site and the color that you saw was not for the gift item that was ordered, it was the color for the CHQD gift because you accidentally left a space between the _ and the word color in the code. It was CHQD_ color and that is causing that color to feed into the entry.
I have a screen shot showing that the color for MSTormHG is still not coming through. I have tried making MStormHG_color & MSTormHG_color2 as part of the “hide” logic for the MSTormHG item in gifts and that did not change the outcome.
I am changing the code back to the first one that you gave me for now, otherwise the color for any MSTormHG gifts ordered right now will not be recorded. For now the MStormHG colors are coming through on all gift orders and both MSTormHG_color and MStormHG_color2 are showing up when MSTormHG is ordered.
To summarize, the new code is still not feeding in the MSTormHG colors when it is ordered in any size.
Attached are the screenshots of your test and of the error in the code that made the CHQD color show up. You will see that no MSTormHG color is there.
Thank you for your continued support. Please let me know what change needs to me made next.
Attachments:
You must be logged in to view attached files.in reply to: Need Help with Conditional LogicThank you!
If you look at the code I sent back to you, I had added MStormHG_color and MStormHG_color2 to the ‘gift’ conditional logic. That made it so that the color choices for MSTormHG did not show up when other gifts were ordered but it also made it so that the choices for the color did not show up when MStormHG was ordered either- the color choices failed to show up for anything. I tried changing the conditional logic under ‘gifts’ for MStormHG because previously I had not set it to ‘show’ the color options when chosen as I did not want both sets of colors to show. When I added MStormHG_color & MStormHG_color2 to the ‘show’ conditional logic for ‘gifts’ the color chosen for MStormHG still did not show in the entries.
MStormHG is the only gift that has conditional logic on the sizes as two of the sizes do not offer all of the colors.
Thank you again!
in reply to: Need Help with Conditional LogicI had to change the code back to the original solution that you gave me otherwise the data for MStormHG would not come through and the site is live right now.
Thank you again for your attention to this matter.
in reply to: Need Help with Conditional LogicThank you for your swift reply.
When I changed the code to what you wrote above I still got the color & color2 for MStormHG in all other ‘gift’ choices and no color when choosing MStormHG.
I changed the code to the following and I no longer get the MStormHG colors for the other ‘gift” selections but the MStormHG_color is still not coming through for MStormHG?
function dhvc_form_submited_data_filter($submited_data){
//Gift conditional logic with key is VALUE of conditional control and value is name of conditional elemenst
$gift_datas = array(
‘LStormHG’=>’LStormHG_size,LStormHG_color’,
‘MStormHG’=>’MStormHG_size,MStormHG_color,MStormHG_color2’,
‘LStormYE’=>’LStormYE_size,LStormYE_color’,
‘MStormYE’=>’MStormYE_size,MStormYE_color’,
‘CHQD’=>’CHQD_size,CHQD_color’,
‘CHAR’=>’CHAR_size,CHAR_color’,
‘BSPpack’=>’BSPpack_color,BSPpack_size’,
‘MSPpack’=>’MSPpack_color,MSPpack_size’,
);
//MStormHG datas conditional logic with key is VALUE of conditional control and value is name of conditional elemenst
$MStormHG_size = array(
‘SM MStormHG’=>’MStormHG_color’,
‘MED MStormHG’=>’MStormHG_color’,
‘LG MStormHG’=>’MStormHG_color’,
‘XLG MStormHG’=>’MStormHG_color’,
‘2XLG MStormHG’=>’MStormHG_color’,
‘3XLG MStormHG’=>’MStormHG_color’,
‘4XLG MStormHG’=>’MStormHG_color2’,
‘5XLG MStormHG’=>’MStormHG_color2’,
);
//check isset post conditional control name “Gift”
if(isset($submited_data[‘Gift’])){
foreach ($gift_datas as $key=>$gift_data){
if($key == $submited_data[‘Gift’] ){
if($key == ‘MStormHG’){
//check with value is ‘MStormHG’
$MStormHG_size_value = isset($submited_data[‘MStormHG_size’]) ? $submited_data[‘MStormHG_size’] : ”;
foreach ($MStormHG_size as $MStormHG_value=>$MStormHG_elements){
if($MStormHG_size_value == $MStormHG_value){
//Not work
continue;
}else{
if(isset($submited_data[$MStormHG_elements])){
//remove MStormHG conditional logic
$submited_data[$MStormHG_elements] = null;
unset($submited_data[$MStormHG_elements]);
}
}
}
}else{
//Not work
continue;
}
}else{
$conditional_elements=(array)explode(‘,’, $gift_data);
foreach ($conditional_elements as $conditional_element){
if(isset($submited_data[$conditional_element])){
//remove with conditional logic
$submited_data[$conditional_element] = null;
unset($submited_data[$conditional_element]);
}
}
}
}
}
return $submited_data;
}Is there something else I should change in how the conditional logic is written in the form to correct this issue? I tried adding MStormHG_color & MStormHG_color2 to the “show” conditional logic under ‘gifts’ to try and correct this. Should I change something under the conditional logic for MStormHG_size?
Thank you so much for you help!
in reply to: Need Help with Conditional LogicThank you for the help!
I am still having a couple of issues after adding that code.
For MStormHG there are also color options- I don’t see them in the code. I don’t have them written into my conditional logic under “gifts” because on that option the colors are also conditional depending on the size chosen. When an MSTormHG is order I do get the colors in the submission but I get both of the sets of colors, MStormHG_color & MStormHG_color2. The other issue is that for every order both sets of MStormHG colors show up, which I am guessing is because they are not specified anywhere in the code that you had me add to the function.php file.
I have an idea of what I would need to add in order to handle this but since I am not experienced in writing php I figured I would ask you. In summary, the MStormHG color options have their own conditional logic under the MStormHG_size category and since they have yet to be mentioned in the php you gave me they are showing up for every order. Also, when the MStormHG is ordered, both color options are showing up as results.
Thank you so much for your support. The code you provided fixed everything else! Thank you!
in reply to: Need Help with Conditional LogicHere is the screenshot of the entry screen with the issue that I am having
Attachments:
You must be logged in to view attached files.in reply to: Need Help with Conditional LogicUPDATE:
I have the form working! I only have one problem left- when I submit a form all of the fields are showing up in the data, even if I did not select them.
So when I pick the first give and choose its size and color the entry is showing up with the gift I chose and the automatic selection for all of the fields! What do I do?
Thank you
in reply to: Need Help with Conditional LogicThis reply has been marked as private.in reply to: Need Help with Conditional LogicThis reply has been marked as private.in reply to: Need Help with Conditional LogicThis reply has been marked as private.in reply to: Configure Mail ChimpHere are my settings
Attachments:
You must be logged in to view attached files.in reply to: Configure Mail Chimp