Please help.
I have made the Packages divided into the number of allowed to post posts and divided into two post display time options.
Unfortunately, it stopped working and I can not fix it.
I would very much like to include Luo Yang in this thread. Luo helped me with creating additional Packages options and it would be best to know what might have gone wrong or I broke down.
Thanks in advance.
Dear Bochnacki,
How do you do this:
I have made the Packages divided into the number of allowed to post posts and divided into two post display time options.
Please describe detail steps to duplicate same problem, I need to duplicate same problem and debug it in my localhost, thanks
Hi Luo.
"Please describe detail steps to duplicate same problem, I need to duplicate same problem and debug it in my localhost, thanks"
- It would be difficult. The design and multiplicity of Packages dependencies are too complex to simply copy and locate my problem.
It will be best as I will give you access to my site and I will describe where and how the problem is revealed.
https://toolset.com/forums/topic/conditional-output-dependent-on-cred-form/#post-560635 - In this thread you helped me to make links displaying for two different types of Packages - one for 15 days, another for 30 days. And it worked well, the links showed up properly. And now they do not show up - screen "empty-link.jpg".
Maybe something went wrong in functions.php. Packages are in six categories and two versions of "display time", so maybe I was wrong, or I wrote something wrong.
It is possible that the problem is with the "package-days", because it was not seen to be added to the package - screen "package-error.jpg".
Here are related threads that may better describe how my Package structure is built:
https://toolset.com/forums/topic/categories-in-packages/#post-549371
https://toolset.com/forums/topic/problem-with-countdown-of-posts-available-for-publication/#post-548362
Thanks.
Since your website isn't in English, I prefer the duplicator package, please follow our document to provide a duplicator package, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
I have a user with the role of "Dealer", and I think there was a problem with this role, because on the "My Account" page is missing buttons.
On the pages of the user with the role "Customer" is all right, there are no errors. There is also no problem with adding posts available in Packages.
See screen "error.jpg".
The right column code on the "My Account" page looks like this:
<div class="site-right-long">
[wpv-if evaluate="('[wpv-current-user info="role"]' = 'dealer') AND ('[classifieds-return-available-ad-credits]' != 'null') "]
<div class="my-account-aside">
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Ogłoszenia w Pakiecie[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Ilość ogłoszeń dostępnych do publikacji:[/wpml-string] <strong>[classifieds-return-available-ad-credits]</strong></p>
</div>
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Pakiet[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Aktywny Pakiet to:[/wpml-string] <strong>[classifieds-return-active-package]</strong></p>
</div>
[/wpv-if]
[wpv-if evaluate="(classifieds_check_if_subscription_is_still_valid() = 'yes') AND (classifieds_verify_if_user_is_ad_package_client() = 'yes') AND ('[wpv-current-user info="logged_in"]' = 'true') AND ('[wpv-current-user info="role"]' = 'dealer')"]
<div class="my-account-aside-inner add-new-ad">
<h5>[wpml-string context="my_account_page"]Dodaj ogłoszenie z Pakietu[/wpml-string]</h5>
<p><a class="btn btn-lg btn-primary" href="[wpv-bloginfo show='url']/nowe-ogloszenie-w-pakiecie/"><strong>[wpml-string context="my_account_page"]Nowe ogłoszenie[/wpml-string]</strong></a></p>
</div>
</div>
[/wpv-if]
[wpv-if evaluate="(classifieds_check_if_subscription_is_still_valid() = 'no') AND (classifieds_verify_if_user_is_ad_package_client() = 'yes') AND ('[wpv-current-user info="logged_in"]' = 'true') AND ('[wpv-current-user info="role"]' = 'dealer')"]
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Pakiet został wykorzystany[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Aby dodać nowe ogłoszenia wybierz:[/wpml-string]</p>
<div class="buttons-add-new"><a href="<em><u>hidden link</u></em>">Pojedyncze ogłoszenie</a></div>
<div class="package-intro">lub jeden z <span>Pakietów 15-dniowych</span></div>
<div class="buttons-add-new">[cred_form form='566' form_name='Add new Ad package']
[cred_form form='add-new-ad-package-10' form_name='Add new Ad package 10']
[cred_form form='add-new-ad-package-20' form_name='Add new Ad package 20']
[cred_form form='add-new-ad-package-50' form_name='Add new Ad package 50']
[cred_form form='add-new-ad-package-100' form_name='Add new Ad package 100']</div>
<div class="package-intro">albo jeden z <span>Pakietów 30-dniowych</span></div>
<div class="buttons-add-new">[cred_form form='add-new-ad-package-30-dni' form_name='Add new Ad package (30 dni)']
[cred_form form='add-new-ad-package-10-30-dni' form_name='Add new Ad package 10 (30 dni)']
[cred_form form='add-new-ad-package-20-30-dni' form_name='Add new Ad package 20 (30 dni)']
[cred_form form='add-new-ad-package-50-30-dni' form_name='Add new Ad package 50 (30 dni)']
[cred_form form='add-new-ad-package-100-30-dni' form_name='Add new Ad package 100 (30 dni)']</div>
</div>
[/wpv-if]
[wpv-if evaluate="('[wpv-current-user info="role"]' = 'customer') AND ('[classifieds-return-available-ad-credits]' != 'null') "]
<div class="my-account-aside">
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Ogłoszenia w Pakiecie[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Ilość ogłoszeń dostępnych do publikacji:[/wpml-string] <strong>[classifieds-return-available-ad-credits]</strong></p>
</div>
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Pakiet[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Aktywny Pakiet to:[/wpml-string] <strong>[classifieds-return-active-package]</strong></p>
</div>
[/wpv-if]
[wpv-if evaluate="(classifieds_check_if_subscription_is_still_valid() = 'yes') AND (classifieds_verify_if_user_is_ad_package_client() = 'yes') AND ('[wpv-current-user info="logged_in"]' = 'true') AND ('[wpv-current-user info="role"]' = 'customer')"]
<div class="my-account-aside-inner add-new-ad">
<h5>[wpml-string context="my_account_page"]Dodaj ogłoszenie z Pakietu[/wpml-string]</h5>
<p><a class="btn btn-lg btn-primary" href="[wpv-bloginfo show='url']/nowe-ogloszenie-w-pakiecie/"><strong>[wpml-string context="my_account_page"]Nowe ogłoszenie[/wpml-string]</strong></a></p>
</div>
</div>
[/wpv-if]
[wpv-if evaluate="(classifieds_check_if_subscription_is_still_valid() = 'no') AND (classifieds_verify_if_user_is_ad_package_client() = 'yes') AND ('[wpv-current-user info="logged_in"]' = 'true') AND ('[wpv-current-user info="role"]' = 'customer')"]
<div class="my-account-aside-inner">
<h4>[wpml-string context="my_account_page"]Pakiet został wykorzystany[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]Aby dodać nowe ogłoszenia wybierz:[/wpml-string]</p>
<div class="buttons-add-new"><a href="<em><u>hidden link</u></em>">Pojedyncze ogłoszenie</a></div>
<div class="package-intro">lub jeden z <span>Pakietów</span></div>
<div class="buttons-add-new">[cred_form form='566' form_name='Add new Ad package']
[cred_form form='add-new-ad-package-10' form_name='Add new Ad package 10']
[cred_form form='add-new-ad-package-20' form_name='Add new Ad package 20']
[cred_form form='add-new-ad-package-50' form_name='Add new Ad package 50']
[cred_form form='add-new-ad-package-100' form_name='Add new Ad package 100']</div>
</div>
[/wpv-if]
</div>
I think these two issues are very closely related.
Thanks for the details, I can download the file, it is a database dump file.
Since you are using some custom PHP codes in the theme file, please provide a copy of your theme/functions .php, you can put it into the ZIP file duplicator.zip, then update this thread, I can download it again.
Done. You can re-download the package.
Thank you.
Thanks for the details, I am downloading the file, will feedback if there is anything found.
I have import your database file and your theme file in my localhost, but it conducts other problem , I can not open any page in front-end, so I have to switch to wordpress default theme, create a wordpress page, with below codes:
wpv-current-user info="role": [wpv-current-user info="role"]
<br />
classifieds-return-available-ad-credits: [classifieds-return-available-ad-credits]
[wpv-conditional if="('[wpv-current-user info="role"]' = 'dealer') AND ('[classifieds-return-available-ad-credits]' != 'null') "]
<h4>[wpml-string context="my_account_page"]Ogłoszenia w Pakiecie[/wpml-string]</h4>
<p>[wpml-string context="my_account_page"]classifieds-return-available-ad-credits:[/wpml-string] <strong>[classifieds-return-available-ad-credits]</strong></p>
[/wpv-conditional]
There are two "Dealer" users in your website:
1) Mar Boch
2) Info Infofo
I tested the first dealer user "Mar Boch", it works fine, it does display the value of [classifieds-return-available-ad-credits], see screenshot dealer.JPG, which is different from your screenshot.
can you confirm it in your website? thanks
Yes. I have exactly the same.
Are we talking about the dealer user "Info Infofo" or user "Mar Boch"?
The user "Info Infofo" does not have any "packet" post, but "Mar Boch" does, but when I tried with user "Mar Boch", the shortcode [classifieds-return-available-ad-credits] works fine, which is different from your screenshot:
https://toolset.com/wp-content/uploads/2017/08/562467-error.jpg?x71388
If it is user "Info Infofo", you will need to login as user "Info Infofo", and purchase some "packet" post
I have no user "Info Infofo".
Instead this is user "info". I did it to see if a newly registered "dealer" works well. As you can see on the screen "error-dealer.jpg" does not work well - can not buy the package because the "Buy Package" button does not appear.
User "marboch" has purchased "Package 50" for 30 days (then everything worked well). But now it can not add a new post in this package because they do not show the buttons to choose categories of posts, and therefore can not reach the post form.
I have the impression that on your copy page there are no errors at all, which I show on the screens. Strange...
There might be some differences between your website and my localhost, you are using other plugins.
Please provide a test sitewith same problem, fill the credentials and FTP access in below "private detail box", also point out the problem page URL, and which username/password I can login to see the problem, I need to test and debug it in a live website, thanks
Thanks for the details, I am checking it in your website, will feedback if there is anything found.
Here are what I found:
1) Login with admin user "automa", edit the user "info":
hidden link
In section "Ad Package User Fields",
Those three custom fields are empty:
a) Ad Package Customer
b) Customer active packages
c) User total available ad credits
So the user "info" did not purchase any "Package" posts, as a result, he can not create new listing post:
Login as user "info", in the "My account" page:
hidden link
It display none, and this is expected result.
Unless there is still other misunderstandings, if you need to create listing post, please login as user "info", and purchase the "Package" posts.
2) Same as above, Login with admin user "automa", edit the user "Mar Boch":
hidden link
In section "Ad Package User Fields",
Those three custom fields are not empty:
a) Ad Package Customer
b) Customer active packages
c) User total available ad credits
So the user "info" did purchase "Package" posts before, as a result, he can create new listing post.
The problem is in the custom field "Package days", see it here:
hidden link
There isn't any value in the custom field "Package days".
You have setup it as a custom checkboxes field, I don't think it is a good idea to setup it as a multiple choice field (Checkboxes), in your case, it need to be a single choice field, for example:
custom select field, radio field. the Types custom checkboxes stores value as an array, it can not be used in the shortcode [wpv-conditional] shortcode.
See the view you are using below codes:
hidden link
[wpv-conditional if="( $(wpcf-package-days) eq '15-days' )"]...[/wpv-conditional]
So the CRED form won't be able to display.