Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug (cannot fill shopping cart) #87

Closed
wants to merge 1 commit into from

Conversation

priojk
Copy link

@priojk priojk commented Sep 13, 2024

Without this change, DOL_DOCUMENT_ROOT is not defined and trying to place an item in the shopping cart results in an error.

Without this change, DOL_DOCUMENT_ROOT is not defined and trying tom place an item in the shopping cart results in an error.
@eldy
Copy link
Member

eldy commented Sep 17, 2024

@Daoud-mohamed is this fix ok for you ?

@Daoud-mohamed
Copy link
Contributor

@priojk @eldy I think this issue is due to not loading the environment for pages of type SERVICE_PAGE .
This issue is resolved by this PR Dolibarr/dolibarr#30245 in the Dolibarr repository.

@eldy
Copy link
Member

eldy commented Sep 17, 2024

@priojk @eldy I think this issue is due to not loading the environment for pages of type SERVICE_PAGE .
This issue is resolved by this PR Dolibarr/dolibarr#30245 in the Dolibarr repository.

So @priojk can you check if after having got the last version and regenerating the website pages (you have a button for this on the website top toolbar), you still have the trouble (you should not) with no need foe this pr ?

@priojk
Copy link
Author

priojk commented Sep 17, 2024

Thanks for looking into this. Actually, I installed from the latest Git resources about a week ago. Since the mentioned PR was merged already on July 3rd, it was already included.

Anyway, I just checked again: if I do not add ' require "master.inc.php";' at the beginning of page 57 (_service_page_Ajax) I cannot add an item to the cart and a popup just says "Error".

Since I did not yet dig very deep into this project, I cannot fully exclude configuration issues or other stupid things on my side.

@Daoud-mohamed
Copy link
Contributor

@priojk
You can check the generated page located at \dolibarr\documents\website_WEBSITEREF_\page57.tpl.php

It should start like that:

image

If it does not start with an include for master.inc.php, you should get the latest version of Dolibarr and the marketplace module, then either reimport the template or reload the marketplace module to regenerate the template pages.

@priojk
Copy link
Author

priojk commented Sep 25, 2024

I just tested this with the very latest Dolibarr v20 and the latest marketplace module, including the three not yet merged PRs. I also reloaded the marketplace module and re-generated the files.

And I still have the error message when trying to fill the shopping cart. The page57 looks like this:

image

By manually changing the include of master.inc.php, I can fill the shopping cart and can complete the full checkout procedure including the payment.

Additional question: is the search supposed to be working already? There I have problems as well, but this may be unrelated and I need to dig deeper to better understand the problem. -> could clarify this, there were three lines to fix to make it work. What would be the best way to submit these fixes? Since they happen on the website, it seems not optimal to submit a patch to the sql file containing the website.

@Daoud-mohamed
Copy link
Contributor

@priojk

Several PRs used in this template are still in the develop branch of dolibarr, and they will probably be merged in V21 of Dolibarr. To resolve the issue, switching to the develop branch of Dolibarr should help.

Regarding the search functionality, it works well and now supports multilingual search. However, it also depends on a PR currently in Dolibarr’s develop branch.

Since this template is still under testing, and we've made some core updates to Dolibarr that are also in the develop branch, it is necessary to use the develop version of Dolibarr until the next release.

If you continue to encounter errors after switching both dolibarr and dolibarr-foundation to the develop branch, feel free to submit fixes by providing the SQL file containing the website data.

@priojk
Copy link
Author

priojk commented Sep 30, 2024

@Daoud-mohamed
Thanks for the clarification about the system requirements - I wasn't aware of the dependency on the develop branch of Dolibarr, but it makes perfect sense. Anyways, this online marketplace provides an amazing functionality.

@priojk priojk closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants