Where is Magento storing cross-reference data - magento

I am trying to convert a Magento shop to an oscommerce shop. The Magento shop sells print cartridges and has cross-referencing so a person can find which cartridge works with which printer. I was able to get the products copied but I don't know where the cross-reference data is stored. I'm not familiar with Magento, at least not to the point of being able to look at the code to figure out the tables used. I created a job in the Magento admin and exported the products but the csv file doesn't show any cross-reference data.
I have full access to the shop and its database - just don't know where to look. I don't know if the cross-reference code was added by a developer or if it is some plugin from Magento. I have versions 1 and 2 of Magento, in case that helps. Does anyone have any suggestions on how to figure out the cross-referencing?

The feature is called cross-selling in Magento. In the Backend you find it while editing a product (Catalog => Manage Products) in the left menu, called "Cross-Selling".
Magento has 2 other types of such relations called "related-products" and "Up-Selling". Maybe you have to transfer that data too.
You can find these relations in the database in the table "catalog_product_link".
Link_type_id = 1 => relation
Link_type_id = 4 => up-selling
Link_type_id = 5 => cross-selling

Related

How To move All Product One Domain to another Domain in Magento

Hello guys,
i develop magento site, all site done but we put product in another domain inside magento site, so how can all product would be transfer in one domain to another domain. like ex. 2000 product would be live one domain i need all product woulde be transfer in another domain.
You can create export, and import product to magento new instance, for last you can use magmi this fastly.
If you have one instance magento, but several storage for market, and domine for him. You can create simple shell and set all products all store for example
foreach(Mage::getModel('catalog/product') as $_product) {
$_product->setStore(1); // set store for product
$_product->setWebsiteIds(array(1)); // set array id's sites for product
$_product->save();
}
if you can't create export file. You can try create dump database product tables and, uply this dump to new system. If you don't have products in new instance.
see this answer for detail
Import magento category and product table only
but remember in last varient you need create full dump databases target systems.
p.s. sorry for my English.

How to change in the Magento DB the prices of the product

I've troubles to figure out how to change the prices of a product in the magento DB.
I tryed to change the prices in the catalog_product_index_price table but the price doesn't change.
There is a website here that explains it in more detail, but the short answer is that you need to change the price in the catalog_product_entity_decimal table and then reindex Product Prices in the backend (and potentially Product Flat Data as well)
Magento uses variety of indexing and caching methods that make simply changing the value directly in the database not a good idea.
If you look, you can see the prices are also defined in the Price Index tables:
catalog_product_index_price_idx
And also the flat tables (if you use them):
catalog_product_flat_1 (number 1 depends on store)
If you're trying to mass update prices, I recommend either using a tool such as Magmi or the built in Magento import methods to update prices. Directly modifying the database is generally not a good idea with Magento, given it's complex database structure.

How to join tables in HMVC?

I used MVC before. Now I am a learning HMVC.
I have product, product_category, product_description and product_images tables in my database.
I want to display list of products in my website with basic product information. Clicking on a product will redirect to a different page and will display all the product related information.
What is the best way to achieve this according to HMVC(Modular MVC) pattern?
Should I create different modules for each table like product module, product category module etc..?(In this case I will have one model class in each module/model. I found this idea when searching internet)
Should I create one module called products and put all the files related to this in that module? (In this case I will be having all the product, product_category, product_description product_images model classes under products/models)
Should I follow a completely different implementation from the techniques I've mentioned above? (Please provide specific details to build this module)
(I'm using codeignitor for my development)
Thanks a lot!
Lets simplify the things for you.
If you have category as menu (Same as magento), i will recommend you to create new module for cateogry
Coming back to product, you can manage all things with the 1 product controller.
In category, category will have its own model to interact with database.
In your product model, you can manage all kind of transactions in one model because they are part of product only.
If you want to move bit advance, you can have a sql folder in each module so that you can install the and create tables when you just drop folder to modules. For this you can create a small script where, in regular interval of time, it will check the new modules, and if that script found some new modules, it will install the .sql file in the sql folder, which will update the database schema.
Hope this will help you

Magento coupon entities in database

I'm trying to develop a Magento plugin which involves using coupons. Apparently after looking around I found a source that mentions use of a 'salesrule' table for coupons. However when I looked at my database i couldn't find it. However I did find 3 tables that had mention 'coupon' called 'coupon_aggregated', 'coupon_aggregated_order', and 'coupon_aggregated_updated'.
I just wanted to know what is the difference between the 3 tables so I can start using them? I am on the latest version of Magento.
The table you're looking for is indeed named
salesrule
There's also a table named salesrule_coupon, which contains specific coupon codes linked back to the main salesrule definition.
If your database is missing this table, something bad has happened to your system. Go to
Promotions -> Shopping Cart Price Rules
and create a new coupon code with a distinct title. Then dump your database content and search for the text of your distinct title. That will let you know which table your system is storing salesrules in.
The tables you mentioned above are aggregate data tables used for reporting only.

How to weave retail outlets info into Magento site

We are trying to do something interesting but challenging:
We have a couple thousand products listed on our B2C site (non-Magento), & are considering moving the site to Magento for a variety of reasons. The product pages provide detailed information about these products. Our user base would now like us to provide local information about retail stores where they can buy these products; the information required would be Retail outlet name, address, zip, phone, & a Google-map display (this last is optional).
In the front-end, each product detail page will display relevant retailers depending on the product AS WELL AS depending on the user's zip. Each user will see upto 5 nearby retailers.
My question is: how best can we set up this in Magento so that we can:
map products to retail_outlets, the way magento allows for mapping of products to categories. Products & outlets will have a many-to-many relationship, & we are looking for something that will be easy to maintain.
Map user's zips to the retailer info.
We are open to using magento 1.7, if that is a better fit.
Thanks in advance.
-TM
This is not the right place for this question as it is not related to programming and does not have code samples and is too general :( read the FAQ please
but in general you need:
add a product attribute (multiselect) with all your retail_outlets and add a possible retailers to a product
ask user to input a zip if he has not jet . you can get this from quote->getShippingAddress()->getPostcode(); if your user is
registered or something
on detail page query out your retailers by zip. This will need you to implement Geo/Spatial Search with MySQL.

Resources