Prestashop 1.6 and multiple discounts - prestashop-1.6

I'd like to cumulate discounts on my prestshop.
For exemple, I have a quantity discount of 20% starts from 5 pieces bought and another discount of 25% on all products who has to be cumulated with the first one.
Now, 25% is apply with less than 5 pieces and 20% with more than 5 pieces.
I'd like to apply 45% if the quantity is more than 5 pieces.
So, I have to cumulate a custom discount (not a cart rule) with a quantity discount.
I don't know how to do that. Maybe it's possible to do it from the administration panel?
Thank you.

You can read the official documentation about Cart Rules.
In Cart Rules > [one of your cart rule] > Conditions there's a Compatibility with other cart rules check box.

Related

purchasing in killos and selling in length? how to measure cost algo?

I am stuck in a situation where I need to come up with an effective way to calculate cost of pipes which is bought in KG and is sold in length and record cost for profit calculation in accounts..
things to consider:
Even if i weight the pipes in feet and meter and add conversion quantities it wont work... because the material used in manufacturing varies sometimes there is e.g. 1000ft in 50 kg and sometimes there is 1150ft in the same weight..
The bundles purchased are sometimes of 52kg, 49kg and 50kg.
Ideas:
(a. i could purchase in unit... and sell in feet and have a customization where after every order i have an option to mark the end of product.. and when i mark the end of the product the purchase cost i.e. $1000 can be divided by the length sold... but issue is it might take a week to sell the product, so it wont show accurate profit at end of day alterntively i can have an approximate cost and have it replaced once the item has ended? thats the best i can come up with. The con of this is what if its time for closing accounts of the year and only half of the bundle has been sold?
what would be the most accurate way of handing this logic in any ERP? POS? The reason i tagged Magento, SAP because i am curious how Magento and SAP handles this situation?
I am feeling accountants and accounts and finance related guys can also chip in, so I am adding the accounting tag
You need to have different UoM for this kind of Item.
Purchasing UoM, Inventory UoM, and Sales UoM. I will consider the Inventory and Sales UoM as the same.
Pipe_A001:
Purchase = Kg |
Inventory = meter |
Sales = meter
So, the challenge is to have the measurement in your Inventory UoM then get the price cost, and you need to take into account when you actually receive against the cost they charge in the Invoice.
Ex: you buy on Aug 1, your PO is 50 Kg # $ 10/Kg, so it Cost you $ 500. Receive actually 49 Kg, but they still charge you for the PO amount which is $ 500.
The 49 Kg is not relevant anymore, since you own the item and you will convert to your measurement which is meter. Let's say you measure and it's 320 meter, so the cost per meter is $ 500 / 320m = $ 1.5625/m.
The next batch on Aug 15, you buy another 50 Kg at the same price. Receive 51 Kg, Invoiced $ 500, Length measured 350m. So now you will have the new batch price which is $ 500 / 350m = $ 1.4285/m.
What matters is not the Kg received, but the cost the Supplier Invoiced and the measurement in your Inventory UoM. You might have an agreement with Supplier that they charge only the weight measured at your receiving point.
From this point, it is back to your procedure whether to count as FIFO with different batch or count as Moving Average.

Algorithm for tracking changes in value over time

I am writing a rails app that deals with product inventory. I would like to include the following features, and am struggling with developing an efficient algorithm:
View stock history (how many were in stock on each date)
Quantity removed from warehouse, and quantity added to warehouse over specific periods of time
Amount of time the product was out of stock in any given period
My questions are as follows:
What is the best way of tracking changes? In addition to my Products
table, should I create another table called
HistoricProductQuantities, and insert a new record each time there
is a change in the quantity?
What number should I track? The historic stock quantity (i.e. 50 in
stock on this day, 24 in stock on that day), or the CHANGE in stock
quantity i.e. -5 (5 sold) or 15 (15 added to inventory)? Or do I
track both in separate tables?
Thanks for your help.
First of all I recommend implementing Date Dimensions on your application, as it seems like you will be doing a lot of Time related calculations. Search on Google for date dimensions as it's beyond the scope of your questions. That said, I believe it will be of great benefit for your app to implement and use date dimensions.
As far as your direct questions go:
What is the best way of tracking changes? In addition to my Products table, should I create another table called HistoricProductQuantities, and insert a new record each time there is a change in the quantity?
Yes you could do this, I would probably call it HistoricProductSnapshot and keep track of the product activity in there on daily basis. With this information as well as time dimensions you could do calculations such as "how many of Product X Did we have 5 days ago or a month ago etc etc."
What number should I track? The historic stock quantity (i.e. 50 in stock on this day, 24 in stock on that day), or the CHANGE in stock quantity i.e. -5 (5 sold) or 15 (15 added to inventory)? Or do I track both in separate tables?
I do not have experience writing inventory control software but I believe with the Snapshot table I mentioned on the question above you would only have to keep track of quantities per day. The Change in product counts could then be calculated from your snapshot table. You could for example have a function that will output the product amount in a given time range as an array. Example: From March 1 to March 7 these were the stock amounts for Product Y [45,40,39,27,22,45,44].
Hope that helps. As I said I am not a product inventory guy but I have worked with Point of Sales Systems and the procedure above should give you a could enough start for what you are trying to do.
This gem could be usefull for tracking changes in models https://github.com/collectiveidea/audited
Keep the data raw. I would personally create a new data entry every day, displaying how much items you have in stock per day. Or you can make the interval much shorter, such as every 12 hours.
For our particular use case:
We had a table called Days, which had a many to many relationship with products, and each "relationship" will have a value called quantity (to keep track of quantity of product per day). Additionally per relationship, we had another value for the relationship with transactions (a one to many relationship) that has the entries for the time of transaction and remaining stocks.
I would personally advise you to use the quantity of stock as the raw data, as it will enable you to gather the data such as how much items were removed during a certain transaction, when the item was out of stock and when it became in stock, all through the data. When you have data in which you need to perform statistical calculations on, it's best to store this data as raw values (quantity of the item).

How to sum up different currencies in Rails app?

I am currently building a Ruby on Rails invoicing application that is multilingual and supports a range of currencies. In the dashboard view all invoices a user has produced are totalled.
Now it would be nice if a user could choose the currency for each invoice.
But how can those invoices be totalled if different currencies are used?
E.g. if these three invoices were created today:
Invoice No. 1: $1000.00
Invoice No. 2: $2000.00
Invoice No. 3: €1000.00
Total: $4333.60
----------------------
The dollar-euro exchange rate would have to be based on each invoice's date of course.
How can this be achieved in Rails and does it even make sense?
Thanks for any pointers.
The sum of of multiple invoices using different currencies is not a single number, it's a collection of numbers. If you have a 20 USD invoice, a 15 EUR invoice, and a 20 EUR invoice, the sum is "20 USD + 35 EUR".
At the time when a payment is made from a single account using a single base currency, then a conversion will be performed to determine how much will have to be paid in that currency to cover the total converted costs. Presumably, there will also be currency conversion fees added at that time.
It would be convenient if you change the currency to a single one, either euro or dollar right when the user makes an invoice. That is, you save the 'converted' value in your database. In this way you won't have to lookup for past day rates.
Eu_central_bank provides exchange rates.

Automatic price change on daily basis in magento

We have a client site who is having gold jewelery magento shop. In that the jewel prices are daily changing,so he have to update each jewel items price often.
(The logic we have here is 1 gram price today is Rs. 1200 and tomorrow it may became RS. 1220 and client is selling 10 gram item as one jewel and 18 gram item as one jewel and so on, so he have to update the price daily for each jewel item based on its weight).
What we are doing now is having a script that checks and updates price daily based on one input field value from admin config section and cron job.
But what i am looking for is(Well truly its not me, but clients wants better than this solution) a way to automatic price change as like % price based on one gram value(Which can be updated by admin daily in configuration section as like now) daily basis. Is there anyway in magento for this? Please advice me.
Thanks
Ela

Runtime multiplication

HI, I have a products model and a dealers model . I am creating an app in which a dealer selects a product and then he's routed to purchase order form . I want to create a dynamic multiplication of Products*Price = Total price i.e. when the form opens , he adds the quantity of the product and the default price is multiplied with no. of products to give total price.
What shall I do ?
Please guide. Thanks
There are a lot of good guides out there for Rails 3 and Unobtrusive Javascript (UJS). Here's one that starts you from the ground up:
http://net.tutsplus.com/tutorials/javascript-ajax/using-unobtrusive-javascript-and-ajax-with-rails-3/

Resources