Magento discount and Promo Discount limitation - magento-1.9

I am using Magento Version 1.9.1.1, Apply discount which is in higher side, normal product discount or promo code discount.
if the catalog discount is 10% and Promo discount is 20% then 20% promo discount should apply instead of 10%.
if the normal discount is 30% and promo discount is 10% then normal discount 30% should apply.
How to handle it in magento. Stop further rule will apply either catalog or Promo, but my requirement is give the discount which is higher.
suggestions please.

Related

Make a HTML Table row "inactive"

I have a HTML table with different products, their description, the quantity that is in stock and a button to decrease the quantity.
When the quantity is zero, I would like to make the row with this product grayed out or inactive and put it at the end of the table.
Is there an easy way to do this with HTML or Bootstrap?

Storing and retrieving width and height attributes to return price per item

I have a client who sells products that have width and height attributes:
1. Measurements are taken from an architectural plan or measured onsite
2. Width and height are rounded to the nearest 100mm
3. Staff member looks up the rounded width across columns in a pdf table (or a spreadsheet) then finds the corresponding height
4. Intersection of the column and row gives the base cost per item
NOTE: These base costs are not linear and cannot be calculated (if only!!); each width/height price must be stored.
There are many products (~20) each of which has a different base cost per unit based on its width and height. I have created a spreadsheet version which is fairly straightforward, but I am grappling with how to store this in Access...any articles/examples I have found have price as a single column and based on SKU; simple but not how this pricing model works.
Any ideas on how to structure the data? Huge thanks in advance...
Matt
The simplest schema is a table with three columns: Width, Height, Cost
Define a unique index containing both Width and Height columns. To find a particular cost, search (filter or join) on the Width and Height columns.
This schema will require that you have duplicate width and height values (although each pair should be unique), but that's the nature of relational table design. It may not seems as "efficient" as the visual lookup capability of the original table since in that case you only label each Width column and each Height row once, but the index defined on the table provides the necessary, efficient lookup mechanism.

continuous subform, subtotal in footer

I have a subform for a table order, called orderdetails.
orderDetails has some textboxes that I need to a total from namely, total quantity, total cubic meters and total weight.
quantity and weight are directly inputted by the user (e.g. qty = 10, weight = 22.55) while total cubic meters is a calculation based from user inputs (length * width * height = cbm, sum of each row).
I have named my controls as txtQuantity, txtWeight, txtCBM and their control sources as quantiy, weight, cbm.
I've placed my unbound textboxes at the footer, and placed the formula =sum(txtQuantity) and have gotten #error. I tried =sum(quantity) and also got a #error.
Another side effect is that after placing these controls, I would also get #name for the controls that they are summing(sometimes. I can't pinpoint when, but if I remove the controls in the footer, they all go back to normal).
How can I resolve my totalling problem?

Side by Side Stacked Bar Chart totaling to 100% in Tableau

I'm trying to visualize the SO Developer Survey in Tableau. I have a side-by-side stacked bar chart. On the x-axis I have job satisfaction, separated by gender. (So, columns: job satisfaction, gender, both are dimensions). On the y-axis I have "most important aspect of a job opportunity" (So, rows: measure values, with each value being a COUNT).
I would like each bar to total to 100% so for each value in measured values I have set the quick table calculation to "Percent of Total" and am computing using cell, but when I do so, every value appears to be equal/100% within the bars.
Can anyone tell me what I am doing wrong? Each value should be some percentage, all totaling up to 100%.
I was trying to follow this tutorial: http://kb.tableau.com/articles/howto/stacked-100-percent-bar-chart
Percent of total computed by cell will always give you 100%. Tableau is telling you that each cell represents 100% of the value for that cell. You will need to change your compute using to get the correct answer.
Here is an example using the "superstore" data set that ships with Tableau. To calculate the percentage breakdown for each region I use the Percent of total table calculation and calculate it by "Pane" which means that the percentage is showing me a value per region (so, "technology" represents 33.999% of sales in the "central" region):

Mysql maintaing Stock with respect to color and size

I am developing stock inventory for Bicycles.
I stored Cycles cid,title, desc etc, in CYCLE table, and another STOCK(sid,cid,qty) for storing stock.
Now i cam to know that Bicycles can have many colors(Black, Red, Orange etc.) AND sizes.
I am confused about storing Stock with respect to Size and Color.
I Modified the STOCK Table
STOCK(sid,cid,qty,color,size).
e.g.
1,101,12,1,null for Red Color
1,101,12,2,null for Green Color
...... (6 records for same cycle with respect to color as there can be 6 colors)
PLUS
Size medium,Large,Small (3 records for same cycle with respect to size)
1,101,12,null,medium - for Medium size
1,101,12,null,Small - for Small size
1,101,12,null,Large - for Large size
Total 9 records for 1 Cycle product.
I have another design in mind for stock
STOCK(sid,cid,qty,red,green,blue,orange,cyan,yellow,medium,Large,Small)
and 1 single record in stock.
1,101,0,0,1,3,5,6,3,0,7
My question is,
Is this right way to maintain a stock, or i can improve.
If you can help to fine tune, i will greatly appreciate.
Your design should be like this:
Cycle table: only 'properties' of the cycle
CID, COLOR, SIZE, PRICE etc
You'll set your size to "SMALL", "MEDIUM" etc
You'll set your color to "RED", "GREEN" etc
Stock table: only maintain the quantity & related details
ID, CID, QTY, DATE_OF_ARRIVAL_OF_SHIPMENT etc
So now, each row in the Cycle table identifies a 'type' of cycle, and each row in the stock table identifies some cycles in stock.
This is good because now, if you have to add another color / size, you only need to create another row in your table, not modify your structure. Also, now you can write simple queries for all your characteristics (e.g. how many cycles of red color across all sizes are in stock?)
Hope this helps!