Track inventory feature with dynamic created "add to cart button"? - web-services

i have actually use form code to auto-generate information and etc.
I was wondering if i can implement the "track inventory qunatity" using dynamic generated buttons , just like in the website?
If this is not possible, how do i actually counter check with my own item quantity everytime a user press "add to cart" and it will minus off 1 quantity from my database.
And when they cancel the checkout , i would get the "-ed 1" back to my database?
Thanks alot, this is my first time working with paypal and have totally no clue

you would most likely handle that in your database with a stored procedure

Related

Oracle Apex - Problem with InteractiveGrid field in Dynamic Action refresh

I have a problem using a dynamic action refresh in an interactive grid.
I have a field of type popup lov, when I choose one of the items in the list, I am performing a query to fill a collection, and then I do a refresh with a dynamic action, so that the data is reflected in the grid.
But at the moment of doing it, this happens with the field:
enter image description here
and in the console it shows me the following:
enter image description here
I hope to have your help, thank you very much.

How to insert and update the inserted row in Oracle APEX?

I want my "Create" button to insert a row on a table and once inserted to update that row. The reason I need to insert that row first and then update is because some columns that I want to update depend on the value being there in the first place. For example I would like to update the "Gross Margin" column but the "Gross Margin" = Payrate + something else. If I don't have the value in "Payrate" column, well there is no way I can update "Gross Margin" since it depends on it.
What I have tried:
) Create a Dynamic Action that triggers if "create" button is clicked. If its clicked is true then run the 2 true actions of type "Execute server side code" which is the Insert statement and the other is the Update statement. I made sure that Insert has the first sequence(It runs first) then the update(It runs second). Please see below picture of the settings of the "Create" button.
Please see below picture of the settings of the "Dynamic action"
See below settings of the "Insert Action"
Below settings of the "Update Action"
2.) I have also tried by creating a "Process" that is binded to the "Create" button when clicked but it did not worked.
I am open to all suggestions and thank you in advance!
I created a workspace on apex.oracle.com to illustrate my answer:
workspace: SO_HELP, username: so_68399404, pwd: so_68399404
App 22384 (Demonstration - EMP / DEPT) is an app generated on the standard emp/dept sample dataset. In the report "Employees", there is a "create" button but employees can also be edited with the edit icon. Both the "create" button and the "edit" link point to the same form (page 4). The salary is depends on the job. If the job is MANAGER then salary is set to 5000 else salary is increased by 1. Similar to your requirement. I did this with an after submit computation with code
CASE WHEN :P4_JOB = 'MANAGER' THEN 5000 ELSE :P4_SAL + 1 END
No other code needed. No dynamic actions, no custom processes. All updates are handled by the process of type "Automatic Row Processing - DML". Login with the credentials above and have a look. If it is not what you need, please explain exactly what is different in this app - or create a new form/report on that data to illustrate your issue.
May I suggest you ask your questions this way ? Extract your problem out of your code and illustrate it with the sample dataset. No one knows your actual data, everyone knows the emp/dept schema. That can avoid endless discussions in the comments.

Display one value and return another in text field with autocomplete Oracel Apex 5

I want to be able to have a text field with autocomplete in Apex 5 that displays a client name, city and state, but just returns that client's client_id from the table.
I'm currently using a popup LOV
Is something like this even possible? I've been digging around for hours for a way to make it happen.
There are plugins out there that accomplish this, but I haven't personally used them.
Here's what I've done:
Add a hidden item
Create a dynamic action to parse the autocomplete item and set the hidden item equal to this value.
Create a validation to ensure that the hidden item's value meets your expectations.

osCommerce: custom price based on user input

I am writing a simple JavaScript which will update my price automatically (I know there are addons but they dont work with the nature of my products) when the user enters amount, size etc etc. I want to know how do I override the product price before/after it is sent to the shopping cart?
Example: The product price is 10€. The user select some variatons and then the price is 22,40€. I want to send that price to the checkout instead of the 10€.
So far I have written my JavaScript which updates the price based on user input and selections. I just need to know how to pass that new price variable and more important WHERE.
Any tips or help would be appreciated.
You mention "variations". Are you using attributes? If so, you can simply attach a price adjustment to each option value. That would be the quickest and most proper way to handle variation-specific pricing.

variable date option in opencart

1st I want to remove text field for date so the calendar will replace it.
2nd I want to make the status order.. I want to sell the service, so I need to make booking order by calendar. If the date is green client can make an order. If red the client can't book an order. If yellow there certain items can be ordered.
I hope someone can help..
Thanks.
You have to try something at least and ask only for advice then.
Anyway, few suggestions:
it cannot be done using that option field of type date, at least not with the default datepicker.
You will need to create Your own datepicker component that will search for free/partialy/fully ordered days in the database and color the table cells accordingly.
It is not very wise to hide the input - by this visible user could anytime check what date did he pick - if it is not visible he would need to always open the datepicker to check for it...
Disallowing to order some service based on some reservations is highly decreasing Your conversion rate - thus decreasing Your income. I would definitely go the way let the user buy/order anything at anytime while having separate reservation system. If user buys a service at thank You page I would recommend him to book a concrete date for the service to be drawn. Here You do not need to fight with product options which are meant totally for something different that You are trying to.
Keep that in mind (mainly the 4th point) and re-think Your problem.