uCommerce_Payment table not populated - umbraco

Hopefully someone could shed some light on where we're going wrong here. Our implementation is using Paypal but having set up the integration as described in the docs (http://docs.ucommerce.net/ucommerce/v5/payment-providers/setup-paypal-standard-website-payments-as-a-payment-method.html) attempting a payment was resulting in a plain postback at the "Preview" stage (i.e. click to pay but page posts back and nothing happens).
My understanding is that somewhere in the pipeline the uCommerce_Payment table must be populated for the PurchaseOrder in question and from there the following code (in uCommerce/Preview.cshtml)...
TransactionLibrary.ExecuteBasketPipeline();
TransactionLibrary.RequestPayments();
...should pick up the entry in this table and direct the payment accordingly.
Problem is, when I check the database there are no records in our uCommerce_Payment table.
Any ideas?

Related

I want to check information contained in a Google sheet, as the respondent is completing a form

We are using forms to allow people (staff) to book equipment out of a store, self service. We record who took what, and when they book it back in. They are asked if the tool condition is good, and if not, are taken to another part of the form to select a fault category. I record this information in the linked sheet.
so my question is can I read the information in the "fault" column of the linked sheet for that item ID, and generate a message to the form user such as "This item has been reported as faulty - please do not use it!" etc etc
If I could script the form so that it scans the linked sheet in the relevant column / row for the item they are trying to scan out, and then warn them that is has an entry in the "Fault" column, that would be perfect. Ideally as they scan the barcode of the item they are taking, before submitting the form, but after submit would be fine too.
I have searched widely and not yet found a solution
Since the only triggers which are available for Forms are the onOpen, onInstall and onFormSubmit, this cannot be done directly.
Possible solutions
1. You can develop your own form
This can be done by using Apps Script & HTML & JavaScript and creating your own Sheets add-on which will interract with the sheet you have in order to check the status of the tool.
2. You can programmatically update either the question name or the form description in order to include the accepted values for the question regarding the tools.
This can be done by creating a script attached to the sheet and using the onEdit(). So whenever a change is made in the tools section for example, this new data can be gathered as a string and update the fields to contain the updated values for the tools.
Reference
Apps Script Simple Triggers;
Extending G Suite with Add-ons.

Rails - manipulating data in popup

I'm new in Rails, I have a Meal model which has many Products. Meals are assign to User (maybe this is important for a concept). In meals/new.html.erb I want to create new Meal as follow:
Click the button "Display Products"
On the same page (meals/new.html.erb) open modal (pop-up) with all products assigned to current user ( I have help method for current-user). It should be displayad like a list or grid with checboxes for example.
Then user can check few products and click "Confirm".
After that in meals/new.html should be appeared list of chosen products with additional input to fill their quantity.
So I have two problem here.
How should I display modal? Is needed any Ajax (I'm not so familiar with this technology)
How can I pass products between view and modal?
Could you help me a little to achieve these goals?
Regarding your first problem, displaying the modal is fairly straight forward. Essentially you will create a div with the proper bootstrap classes to be hidden when the page is loaded, and then create a button that makes it visible. I would recommend either reading over the W3Schools entry on modals, or from the appropriate part of the bootstrap javascript documentation.
Regarding your second question, this depends on exactly what you mean. The modal is part of the view, so if you're only trying to put information that is currently on the modal back onto the "page" behind it, you can do so fairly simply with javascript (copying content out of one element into another, or updating states of inputs). If, on the other hand, you're trying to use the modal to retrieve information from the server (for instance if you wanted to show a list of possible options, and then display detailed information about the selected items from the database) that would require Ajax.
If you have any snippets of code that aren't functioning as you expect, feel free to add your View to the question. In cases like this, usually the best way for us to provide help is for you to take an early crack at this, post the relevant code, and then seek answers for the things that behave unexpectedly.
I hope that helps.

One view having multiple button in asp.net mvc

I am not able to understand the flow on this page
how they are doing in MVC http://demo.nopcommerce.com/onepagecheckout
till now i created only one button for one page (view ) or provide me some similar link or similar code so i can understand
i want to implement same in my application
Thanks in Advance
The page is using AJAX to achieve the effect. Let's go through how it works.
The page is divided up into four sections.
Billing Address
Payment Method
Payment Information
Confirm Order
Each section is treated separately and are likely rendered using partial views. Each section has it's own form. When the user fills out a section and then submits that section, the form is submitted to a particular action. The Billing Address section submits its form to /checkout/OpcSaveBilling, the Payment Method section submits its form to /checkout/OpcSavePaymentMethod and so on.
When these forms are submitted (asynchronously, remember), the server handles the business logic and the validation and returns a result in the form of JSON. The JSON describes what happened, i.e. the result of the validation (success or fail), any errors that occurred and also contains HTML that the page can use to redisplay that particular section.
How is this data being remembered? Sessions. When forms are successful in their submission, the form data is stored per user in the session data. This way the system knows each user's settings and also knows where they are up to in the process.
The final step, Confirm Order, doesn't bother sending any form data because the server already knows everything through the session information.

Update content when new values are added to database?

I know my question might be ovbious for some of you, but I'm not sure how to do it, and I can't find it on google, probably because I'm not using the right keywords.
I'm using the latest rails. On my view I have a table generated by rails. People are able to add content to that table by sending a rails form.
I want this table to be updated with newly updated values, without having to refresh the page.
For example, if user 1 sent the rails form and added a new value to the database, I want user 2 to see this update without having to refresh the page.
I would highly suggest watching the Polling for Changes - Railscast that covers exactly what you are looking for.
This essentially will cover how to use jQuery to poll the server to see if there are any changes, and apply them to the page without refreshing(ajax).

EF4 Code First: Lazy Loading Issue

On the web site I am currently working on I decided to give EF4 Code First a shot. It doesn't seem to bad, although not supporting enums means the impressive points are negated by a simple short coming.
Anyway, the problem I have now is that I have a book object which has a collection of authors. When I click on a page where the book is reviewed - an error gets thrown when the book's authors cannot be added to the viewdata - saying the author's collection for this book is null.
so, I navigate to the administration page, go to edit the book, and then suddenly the authors re-appear. So i navigate back to the review page and the authors now appear on this page too.
It looks like they aren't being loaded the first time, but for some reason the admin section causes them to load, so when I head back to the review page it all works fine.
If i happen to do a recompile, and go straight to the review page, they're gone again.
I'm getting my books from the context using CreateObject set - via repository. This method is used both on the admin page and also the review page.
thanks if you are able to help.
To allow lazy loading on POCO class you have to mark your navigation properties as virtual. To force eager loading modify query in your repository and use something like Include("Authors") on queryed ObjectSet.
Just done a little more investigation and I know why it works on the admin page. After debugging through, I found the book's authors collection is initially null. But when a select list is rendered, that contains all the author's in the system, then it gets its authors collection populated.
So in my review action, I retrieve all authors from the repository, without using them in any way, and then my book's collection is also populated.
I guess all this waffling leads to the question: How can I fix lazy loading, or how can I ensure eager loading. I don't think performance will ever be critical and I've had enough faffing with code first now. Think I'll stick to Active record/nhibernate for the time being on other projects.

Resources