Skip Navigation

[Closed] Set up Flexible Product Selection in CRED Commerce

This support ticket is created 8 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Tagged: 

This topic contains 25 replies, has 4 voices.

Last updated by yuri.s 8 years, 2 months ago.

Assisted by: yuri.s.

Author
Posts
#360456

That sounds good, I was just checking in here to see how it was going.

Regards,
Jakob

#361075

Hi Jakob, we were able to detect the issue on our code and now our main CRED developer is evaluating whats steps will need to be taken to correct this.

As soon as I hear from him I'll let you know.

Regards,
Yuri.

#361083

OK, that sounds great and it's very timely for my current needs.

Regards,
Jakob

#364015

Hi Jakob, our CRED developer noticed that the Json format you used might be throwing off the parsing. Would you mind testing your code with the following shortcode?

add_shortcode( "evidensia-register-productid", "evidensia_register_product_id" );
function evidensia_register_product_id() {
    $product_id = $_POST['product_id'];
    //$product_id_json = "{'value':'$product_id'}";
    $product_id_arr = array('value'=>$product_id);
    return json_encode($product_id_arr);
}
#364364

That code works better. It gets the right id into the CRED form in the custom field.

The problem now is that I'm back at the problem with "Sorry, this product cannot be purchased." You should be able to see that at the test site I've provided.

I've disabled stock management in WooCommerce setting, because it's not needed. Why then do I now get the "not purchasable" message?

PS: Wouldn't it be good if you add a code example about the json formatting in point 2.1 here?:
https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/

#364427

For some reason, it seems to work, when I create the generic custom field as a SELECT-field instead of a RADIO-field:

[cred_generic_field field="evi-product-id" type="select" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[ [evidensia-register-productid] ]
}
[/cred_generic_field]

Good for me, but I hope you will figure out why the RADIO-field doesn't work, since the docs says you can use either.

#364475

Hi Jakob, thanks for the catch! I'll inform our CRED developer and he will make the appropriate changes on the Radio element.

Thanks a lot for your patience on this issue and for helping us debug our product. If there is anything else you need don't hesitate to contact us!

Regards,
Yuri.

#364486

I hope you'll also update the docs 🙂

One more thing, I'm trying to add a class on the SELECT-field in order to hide it :


[cred_generic_field field="evi-product-id" type="select" class="skjul" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[ [evidensia-regtwo-productid] ]
}
[/cred_generic_field]

But the class, "skjul" is not added in the frontend.

#364724

Hi Jakob, I tried replicating the styling issue but it didn't happen on my local test. Can you point me in your site what page and CRED form is this happening?

Regards,
Yuri

#364852

Yeah, but I'd like to give that information in a private message.

#365074

Sure thing. I'm setting the private fields for your next response here.

Regards,
Yuri.

The topic ‘[Closed] Set up Flexible Product Selection in CRED Commerce’ is closed to new replies.