Thank you for your reply.
I checked the new booking form where It's located in a single product page as I recently included another form to approve the post on the same page. When I removed the recent form from the page, It seems that it works back again and saves the relationship. I'll try to find another way around with the packs forms as I have 3 cred forms on it's page that are displayed in a loop view.
If you have a solution for inserting more than a cred form on the same page, I'll appreciate it so much.
Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
I assume we are talking about the page "Membership": hidden link
and the view "Membership" hidden link
The post form "Premium Pack": hidden link
I have tested it in my localhost, in the page "Membership", you are displaying the post form "Premium Pack" three times, when I click one of the submit button, it adds the same product "Premium Pack" in to cart.
Are you going to add different product into the cart depends on the post view "Membership"?
If it is, you can try with the filter hook "cred_commerce_add_product_to_cart", for example add below codes into your theme file "functions.php":
Thank you for your recommendation as I already set a filter to update the product in the cart.
still the relationship problem existing.
I moved the cred form to a separate page and created a cred child post link, I get the right product id in the url but can't use it to update the cred form post title as it's getting the post title from the page containing the form instead of the product.
If there is a way to extract the parent product id from the url, that would be a solution in my opinion.
The other way around that: if there is an api shortcode to connect the 2 post types from php.