Hope someone can help me with this..
I have a magento store up&running, via the attribute management ive created a price attribute (type: price, label: "Extra costs") and added it to the right attribute-set.
Now "Product A" has a price of $1 and "Extra costs" set to $2
When i order the product i kinda expect a subtotal of $3 however the extra costs are nowhere to be found.
To clearify;
Product A
Price: $1
Extra costs: $2
Product B
Price: $2
Extra costs: $4
Now im ordering both products twice; i expected my cart/order overview to look like this;
Product A | Qty: 2 | $2 (2x$1)
Product B | Qty: 2 | $4 (2x$2)
Subtotal: $6
Extra costs: $12 (2x$2 + 2x$4)
Shipping: irrelevant
Tax: irrelevant
Total: $18
However the extra costs are not calculated.. am I overlooking something? Or is it not possible at all? (If so, whats the usage of price attributes then?)
// Roland
Attributes other than the core ones are informational only (e.g. on their own, they won't affect the price of the product). In order to get an active "extra cost" field, you would need to modify the product type definitions, something which will take much longer than you want it to.
For what reason are you including this cost outside the price? The optimal way to solve this would be to simply add it to the product price itself. Adding it to the subtotal as you've indicated will be tough (but is possible if there is a hard requirement around it). Please clarify your need a little further.
Related
In Inventory location in module Inventory. It shows list of products in that location and the quantity of available stock. It is easy to print that out with a report.
However, if I want to show the stock moves related to each product quantity and show it under the total of each number of current stock, how can that be done?
For example:
Formatting
Also, I would want to print the data out in this format. How could it be done?
I have tried linking the stock.moves field to the stock.quant model but I am not sure how to present the data in that format with the current stock level as a summary above all related stock.moves
So I was able to create a search that shows historical unit rates at an item level then I can filter by customer to show any price increases that may have taken place to create a price tracker. It works as advertised. Below is a screen shot of what the output is. "Base Price" is the minimum item rate for lifespan since we transitioned to NetSuite. Then 1-6 months back it will pull the item rate and as you can see, around the 3rd month, it increases and shows change.
Here is how the search looks when executed
What I am attempting to do now subtract the values from the formula from the "base price" because that is at the end of the day the total impact value. Eventually I want to bring in quantity so we can see the total impact of these changes to track if we are seeing an increase or not.
EX. If base is $2 and we sell 20 a month. $40 in sales. Now we up it to $3, sales would be $60. But we want to show the $20 in increase impact instead.
Below is from the results tab to generate the above.
Here is the view from the Results Tab
Is there a way to create that calculation somehow in NS? I am almost thinking it is because I used the DECODE instead of the CASE WHEN ?
Thank you
You can generally combine supported functions; you just need to make sure that any functions applied in the Summary or Function columns are replicated in the formula. For example, your first column "Item Rate" has a Summary function or "Minimum" applied - this needs to be included in the formula, something like:
DECODE(...) - MIN({rate})
Trying to remove an item from the quote object, but cannot get order total updated.
For example, a customer adds product A ($2), and B ($3) to the cart, and then place the order.
After customer hits the place order button, I am trying to remove product B from the order.
Using the code below, I can successfully remove B from the order. But the total of the order is not updated.
$quote->getItemsCollection()->removeItemByKey($item->getId());
Say I have product B removed, then order should have a total of $2, but I checked from the order grid in backend, the total was $5.
//Try with the below code. not tested.
$quote->getItemsCollection()->removeItemByKey($item->getId());
$quote->save();
//I thing you need to remove items from order to reflect your changes in order.
foreach($order->getAllItems() as $item) {
$item->isDeleted(true);
}
Please note that this is not recommended to do things like this as per this link More details
I have to fetch the price of Lego items
http://mightyutan.com.my/batman-movie/?id_category=1413&n=100
But the challenges here are the price are split into two conditions
No discount, reflect regular price
With discount, show discounted price
How could I use ImportXML for my column to display discounted price, else regular price? I only know to capture a fixed xpath pattern
//div[#class='content_price']/span[#class='price'][1]
Also, I have display the title of the Lego set, for due to the items with no discount, total rows return from my title and price are not tally
Thanks for the help
try this if you want to use include class:
//*[contains(#class,'product-block-inner')]//span[contains(#class,'price')][last()]
or better this when you are sure class won't be changed:
//*[#class = 'product-block']//span[#class='price'][last()]
as discount is located after initial price - just get last price element for product, so it will be discount or if it's not available - initial price =)
We are creating a new total line item on the quote, such as an oversize charge and this needs to be taken into account when the tax calculation is calculated. We have set it to be before tax, but obviously when looking through the tax total file it doesn't appear to grab other totals or a way to say this total needs to have tax applied.
Has anyone came up with a solution to this?
From what I can remember all the 'footer' totals (I remember them as being in a <tfoot> normally) are based on the subtotal and not each other. If your 'oversize' total block modifies the subtotal after it has been displayed then maybe the tax will calculate the updated value.
In your collect method you can try to add the value to the Subtotal instead of the GradTotal ( $address->setSubtotal ). I'm not sure if it will work or if it will need further adjustments.