0

I created 2 custom price attributes as shown in the screenshot.
mulcurr

I've entered some values. I want that to be reflected in database. Here is the screen shot of the table which contains Price[USD] value.
table

The values for Price[INR] and Price[EUR] isn't getting reflected, it is showing NULL value. How to correct it?

  • 1
    are you sure that 76 and 120 are the ids of your attributes? Check the eav_attribute table to see the correct ids. Or maybe you didn't add the attributes with tyoe decimal and they are shown in a different table. If you see the values in the admin then for sure they are in the db. – Marius Jul 9 '14 at 8:08
  • Well, the attribute 76 is pointing to special_price and attribute 120 is pointing to msrp. Where are price[INR] and price[EUR] are stored? – brainReader Jul 9 '14 at 8:13
  • Got it. The attribute 134 and 135 are pointing to Price[INR] and price[EUR]. But in which table are they stored? – brainReader Jul 9 '14 at 8:15
3

Run this query

Select * From eav_attribute where attribute_code IN ('code for price INR', 'code for price EURO')

This should result in 2 rows. Look at the column backend_type. It will tell you what type is that attribute.
If the value is static then the value should be stored in catalog_product_entity, but I doubt that this is the case for you.

for any other value, look in the table catalog_product_entity_{value here}.

By the looks of the values you have in the screenshot I can say that their type is int. So look in catalog_product_entity_int. Based on the comments...so your type is varchar

Run this query:

SELECT 
    * 
FROM 
    catalog_product_entity_varchar
WHERE 
    entity_id = 1 AND
    attribute_id IN (134, 135)

If I'm right, then you should change the attribute type to decimal so it can be stored as the rest of the prices.

| improve this answer | |
  • back-end type says varchar in case of me, so I'm trying catalog_product_entity_varchar table – brainReader Jul 9 '14 at 8:26
  • @AjayKulkarni. Varchar then. I will update the answer. – Marius Jul 9 '14 at 8:27
  • So I'll change varchar to decimal, and hope that the values will appear in catalog_product_entity_decimal – brainReader Jul 9 '14 at 8:29
  • @AjayKulkarni. Don't forget to clear the cache. – Marius Jul 9 '14 at 8:32
  • I decided not to change the values. Let the types be varchar. And I've 1 more requirement. I can do like this for multiple products. If I select any other currency other than default USD, then the corresponding values should be reflected in front end. I don't want magento to convert them to other values based on webserviceex rates. How to do that? – brainReader Jul 9 '14 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.