product old price in virtuemart - joomla1.5

I am using virtuemart for my application made by joomla 1.5 .
Now in my product list I am getting the old price and new price and also display how much I can save for that product.
But I am able to find out where these old and new price have been stored in database. Could you please guide me in which table that old price is stored?

If I am getting your question correct then you want the base price and discount price(override).If yes then you can get the base price(old price) in the jos_vm_product_price table the column name is product_price and for the new price(override) is in the jos_vm_product_discount table and the column name is amount.See if it helps.

Related

Is there a better way to design an E-commerce products database when the products can have multiple price lines?

I'm trying to develop a new products database for a client and I am having a hard time finding a solution to handle the many different prices a product can have.
Variables that can affect the price of a product:
region (where the customer lives).
customer type (whether they're a new customer or a registered customer).
order type (whether you want to purchase the item once or subscribe monthly).
store type (there were many store types, but now they're transitioning to one, but I don't know if they will add more in the future again so I want this to be flexible
Product Table
id
product_name
sku
description
1
Vanilla Protein Powder
1111
This is a description...
Attributes Table
id
associate_type
region
store
currency_code
order_type
1
2
1
11
usd
1
2
2
1
11
usd
2
Product Attributes Table
id
price
product_id
attribute_id
1
49.95
1
1
2
29.95
1
2
I was initially thinking this would be a good route to go, but the issue that arises is on the product page I want to display the price of the product if you want to purchase it once and the price if you wanted to subscribe. The same issue would happen if I also wanted to show a list of product cards on a product category page displaying both prices.
The issue I run into
When I write a query to get the correct products with the correct price lines, I would filter all the products by the variables mentioned above, but I will always want the subscription price and the one-time price, so in the query, I would have to include WHERE order_type = 1 AND order_type = 2 but doing this would return duplicate records of the product/ products because of the different prices for a one-time purchase and a subscription purchase.
Is there a better way to set up the tables I have so that the query would not return duplicate records of the product/ products? Or is there a way to write the query to handle this for me? Or do I even need to switch up my database design altogether?

how to get a data which is not entered in the specific date and also get the data which is entered in the specific date in tableau

I am creating a report for a retail shop in which i need to give a product in stock per day so i used the entry date as a parameter to filter the data but the problem here is the items which are not entry on that specific day is not coming on the report i need the report to be like
if parameter=entrydate then product in stock else preveious product in stock
i.e if the item is not entered in that particular date it should give the past record of it. how to get that please help me with this
Regards,
Jen

Magento : Add Coupon Code at sales order grid

I want to add coupon code in sales order grid . As we know Sales order gird build from sales_flat_order_grid table
Coupon_code column is exist in sales_flat_order table not sales_flat_order_grid table.
When I add coupon_code at sales order grid but when i search the coupon code with status column then got this error : Column 'status' in where clause is ambiguous
Note : I am working on existing project not new project
Magento version : 1.7.02
Can you please provid me solution
Thanks
You need to add a filter_index to your addColumn method to specify which table you want to search for status.
I assume the problem is that status exists in both sales_flat_order_grid and sales_flat_order.
There are loads of links on this around the place. Try here or here amongst others.

Unable to sort configurable products based on attribute value and price

Am new to Magento. Am unable to sort the products in my shopping cart based on price and attribute name -- qty. My attribute values are 750 ml, 500ml, 200ml and they have their respective price. Sorting using only price is working but i dnt know how to sort using the attribute value. The below code displays the minimum price value. But i want to display the minimum price value of the minimum attribute value
echo $this->getPriceHtml($_product,true);
The easiest way is to edit you attribute (in Attribute management) to be shown in product listing and Used for Sorting in product listing
In this way you are sure that the attribute is selected in the collection and it's available from the catalog/product template pages.

Descrese quantity when order is placed

I want to decrement quantity 10 of particular product each time place an order by customer in magento. its don't matter what quantity added in product detail page by customer.
Please help
Maybe using observer like sales_quote_add_item, will allow you to set custom quantity once the product is added to the cart.