I wanted that my total payable amount will get updated after every single change in ui like selecting of checkbox will result in adding that checkbox item value to total payable amount.
Related
I am trying to sub-group orders per stock label (e.g: USD/CAD) and then to display its orders' price.
I split the orders chart per sub-group. The sub-group works partially, it doesn't show the right number of orders inside (every sub-group Label should have 40 orders inside but it display 80 orders). Also, the price of each order inside is not displaying the correct price.
So the 2 issues are:
The price of each order inside each sub-group is wrong. They display all the equal same value which is not the correct price. The picture below shows the JSON input data with the correct order price that should be displayed. How can I display the correct value?
And the second issue is the sub-groups show more orders then it should. I have 40 orders inside each label and the number of orders displayed is 80 per sub-group.
Still cant get it after aggregating first per order id, then per Label and in the end summing per order price.
After trying the fix, the price keeps displaying the wrong price per order and also don`t expand the 6 labels as the picture below shows
When we select custom options total price is calculated in product.js. I want to know where these functions are called for making changes for total price other than product.js. I am new to magento. Will be thankful for help.
I tried to create an item using Square Connect and made it taxable. When I retrieved the item back from Square (even when I retrieved it through a separate call, instead of relying on the return value of the Create call), the taxable field is shown as true, but when I brought up the Register app, that new item was not toggle as taxable.
Thanks for pointing out this confusing point in the API and documentation. The taxable field of the Item object is in fact deprecated (I will update the documentation accordingly). Setting the value of this field has no effect.
Regarding your particular issue, I believe you're saying that you:
Created an item with the Connect API
Opened Square Register and added your item to a sale
Noticed that none of your pre-existing taxes was automatically applied to the item in the sale
After you create an item with the Connect API, you need to specify which taxes are automatically applied to it (by default, no taxes are applied). You do this with the Apply Fee endpoint. The fees field of an Item object indicates which taxes are automatically applied to an item. If this field is an empty array, no taxes are applied automatically.
Note that regardless of which fees are applied automatically, merchants can customize which taxes to apply to an item for a particular sale.
I want the Custom Options in Magento to calculate percentage cost from the already changed price (of other custom options) and not the base price.
I can get the desired results here of calculating percentage based on the changed price value rather than the base price by changing this line of code in app/code/core/Mage/Catalog/Model/Product/Type/Price.php to $finalPrice instead of $basePrice
from this:
$finalPrice += $group->getOptionPrice($quoteItemOption->getValue(), $basePrice);
to this:
$finalPrice += $group->getOptionPrice($quoteItemOption->getValue(), $finalPrice);
However - this successfully updates in the cart price, but does not update the on the fly option price on the product page itself.
Any clue on how to change the price on the product page???
The on the fly option price is built by a JavaScript function defined in a file called configurable.js.
There is a function which (re)builds the html <select> and <option> values every time a value is selected.
There is another function which generates the array of prices / option values and which calls the (re)build function.
TL;DR: There's calculation logic inside the JavaScripts, namely configurable.js.
I'm trying to write a simple stock check program, and I have a Table View binded to Core Data. The table has 3 columns: Model, Price and Quantity In Stock.
I have a NSTextField and a NSButton underneath this, so that the user can enter the quantity they wish to buy, and when they click "add to cart", the program should fetch the value in the "quantity in stock" column, in the selected row, and deduct the value entered into the NSTextField, obviously, it would return an error is there isn't enough in stock. At the same time, the whole row, model, price and quantity desired should be added to an "invoice".
My question is this: How would I go about retrieving the value in the quantity field at the selected row, manipulating it, and reinserting it into the table?
Or would I have to edit the Core Data directly? And how would I go about that?
Many thanks,
Michael
I assume the table is, in fact, bound to an NSArrayController instance. The controller's selectedObjects property is what you want.