TeamUbersmith / order-forms

Online order forms that give Ubersmith clients the ability to sell their services easily via their website.
2 stars 1 forks source link

Undefined Variables #1

Open TonyTheTech opened 10 years ago

TonyTheTech commented 10 years ago

Is there any documentation as to what to do after installation to actually use this?

  1. I installed order-forms
  2. I browsed to the url in my browser
  3. My Service properly Appears
  4. When clicking on the service plan to configure I get the following error:

Notice (8): Undefined variable: setup_fee [APP/Controller/ConfiguratorController.php, line 1027] Notice (8): Undefined variable: monthly_price [APP/Controller/ConfiguratorController.php, line 1031] Notice (8): Undefined variable: monthly_price [APP/Controller/ConfiguratorController.php, line 1035] Notice (8): Undefined variable: monthly_price [APP/Controller/ConfiguratorController.php, line 1045] Notice (8): Undefined variable: setup_fee [APP/Controller/ConfiguratorController.php, line 1046]

ubersmith commented 10 years ago

While our open source order forms are officially unsupported I passed the issues you were running into to one of our developers to see if they could suggest any potential causes/solutions. Here is what they provided:

For the issue in the first message, that is being caused by undefined variables $monthly_price and $setup_fee. Both these variables are set as part of the step_1 function which is run after selecting a service plan and the reason for the undefined variables is because of a missing billing_period requirement. What this function does is get a list of all billing periods from the system and it will loop through them until it finds one with the api_label “monthly”. For each billing period that doesn’t match that requirement it will continue onto the next one and will only set the variables if a match is found.

Therefore, the first thing I would do is go to Setup & Admin -> Client Manager -> Billing Periods and make sure there is a billing period with the api_label “monthly”. It may be possible that the billing period was deleted all together or the api_label was changed. If that’s fixed up, those errors related to $monthly_price and $setup_fee should be fixed.

As for the issues defined in the second message, they could possibly be caused by something missed during the setup process. I did notice that the instructions to follow were missing a few minor things (mainly file / folder permission related) and until I completed those additional steps I were getting some similar errors (particularly the undefined variable $navigation_summary). However, I would probably suggest checking out the billing periods first to make sure that’s all in order first as that should clear a good amount of the errors and give us a good indication of what else could be missing from a setup

perspective based on what errors remain.

-boo van alstyne ubersmith vp support

To view this ticket online, log in to https://billing.ubersmith.com/ticket.php?ticket_id=307008

TonyTheTech commented 10 years ago

I definitely appreciate you taking the time to write such a lengthy and detailed reply. You were right about our monthly billing period having a different api name than "monthly". I am not sure why it was changed and need to confirmed that with my supervisors before moving forward.

Do you know if changing the api label will have any adverse affects? Considering we are not using the ubersmith API for any 3rd party of custom integrations. Just wasn't sure if that would affect ubersmith internally or mess up our clients billing or anything.

ubersmith commented 10 years ago

Changing the API label back should not have any effect if you're not currently using any custom code that relies on the modified label. All internal code uses other methods for identifying the periods so the label won't affect any of that.

-boo van alstyne ubersmith vp support

To view this ticket online, log in to https://billing.ubersmith.com/ticket.php?ticket_id=307008

TonyTheTech commented 10 years ago

Awesome! Changing the API name for monthly fixed the trick. Now The issues I have is whenever I click on "Add to Cart" I get the error described here:

ubersmith commented 10 years ago

The database error would seem to indicate that the app/Config/database.php file has not been fully updated. The script is attempting to show all tables from the database but no name has been provided, hence the error. If you update that file to point to the proper database configuration you should be set. The navigation summary error should go away as well as it appears that it's only returned if there is some other error reported in the script first so it should be a two birds one stone situation. If that doesn't solve it, let us know. Thanks.

-boo van alstyne ubersmith vp support

To view this ticket online, log in to https://billing.ubersmith.com/ticket.php?ticket_id=307008