Questions tagged [join-table]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
773 views

Magento-2 : How to set admin form data by join tables

I have a custom admin module which store customer related data. My custom table created foreign key with customer_id. I displayed customer name, email in my module grid by join query, It's working ...
Suresh Chikani's user avatar
1 vote
2 answers
1k views

Joining Products Table with Custom Module Table (Adding Product Thumbnails to Custom Grid)

I created a custom module with a grid and needed to display product thumbnail images there. Tried codes from the answer below and the thumbnails were added, BUT ALL MY OTHER COLUMNS IN THE GRID ARE ...
bestwebdevs's user avatar
1 vote
0 answers
743 views

Magento 2 : Get Data From Two Tables or Model

I have created ui component and it works fine, I added data provider file and customized my getData function:- public function getData() { if (!$this->getCollection()->isLoaded()) { ...
arushi's user avatar
  • 790
5 votes
4 answers
35k views

Magento 2: join custom table with product collection while sql query is running fine

I trying to join custom table with product collection but I am not getting result. But printed SQL query is running fine namespace Vendor\Module\Block\Product; use Magento\Catalog\Api\...
Abhishek's user avatar
  • 939
1 vote
1 answer
1k views

Magento 1.9.x - I want to join first name and last name in customer grid

I want to get fullname of customers in magento back-end server. I already brought the first name in index "NAME" and i want to join the lastname after first name. protected function ...
3CE's user avatar
  • 594
8 votes
1 answer
15k views

How to join product collection of magento 2 to a custom table?

I have a custom table user_product_table with a field sku(this field join to product collection) and user. How can I join this table with product collection, so that I don't have to loop my custom ...
Prakash Thapa's user avatar
1 vote
2 answers
3k views

join tables for get payment method of order id

I need to join 3 tables to get payment method of specific order id Let me explain my query. I have to load a custom_id and take saved order id from my table 'custom_data'. Now I want to find which ...
roine's user avatar
  • 11
0 votes
1 answer
546 views

How to LEFT-JOIN 'catalog/category' fields to 'sales/order_item' collection?

I'm trying to left-join some of the 'catalog/category' attributes to a 'sales/order_item' collection. For example: a satisfying result will let me add the category-name to the order-item data. *I ...
Pini's user avatar
  • 917
0 votes
1 answer
510 views

Sort product collection by select attribute's option value sort_order - how?

I am trying to sort a product collection by an attribute that is of the 'select' type with lots of option values, all of which have sort order positions set. My attribute is called 'style'. When I ...
Henry's Cat's user avatar
  • 2,045
0 votes
2 answers
972 views

After join the customer name with custom module, i can't filter the grid by customer name

I create a custom module for product question. I added in my db the customer_id, but in the grid I want to show the name of customer. For that I did a join with customer_entity_varchar and got the ...
Claudiu's user avatar
1 vote
2 answers
2k views

How to Join an EAV to a Flat Table & Import Flat Table and Update EAV

This will be two parts 1.) Join an EAV to a Flat Table the Magento way 2.) Import into Flat Table that will update the EAV Table. Basically be able to Export(Flat Table) and Import(with flat table) ...
Bill Murray's user avatar
2 votes
2 answers
875 views

joinLeft escape string from ON condition

I am wondering if it is possible to escape string inside ON condition, something like binding params inside where condition. This is my code $this->getSelect()->joinLeft( array('...
JohnyFree's user avatar
  • 1,529
1 vote
1 answer
315 views

How to join three tables for filteration?

I am applying filter on order collection. I am stuck in a situation, I have added a custom attribute to "customer address". that is in table "customer_address_entity_varchar", now I have to join ...
Abdul Ghaffar's user avatar
1 vote
1 answer
1k views

Joining two collection / tables

I have situation I want to join two tables having some data related to orders.One table contain order id as increment_id and other table contain order id as order_id.I am joining the tables through ...
Vivek Khandelwal's user avatar
7 votes
2 answers
18k views

Join the two tables in Magento 2

I'm trying to join two tables but it's returning wrong result could you please suggest me how to write it. Data: From my custom table(product_id,email,id) have Product_id. Expecting Result : join ...
M_N's user avatar
  • 191
2 votes
1 answer
2k views

Add attribute filter 'manufacturer' to 'reports/product_collection'

I want to filter reports/product_collection by attribute manufacturer. I try with this: $_productCollection = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('...
Bernhard Prange's user avatar
3 votes
1 answer
2k views

Get Product name in grid

In custom module i m saving product id in my table using that i want to display product name in admin grid I m trying this code to join table $collection->getSelect() ->joinLeft( ...
Newbie's user avatar
  • 1,604
2 votes
1 answer
3k views

How to do multiple join query in magento

I have to add Extra field like buyer name in Admin sales order create section Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid In collection Add code like $collection->getSelect()->join(...
GR Rajkumar's user avatar
2 votes
1 answer
2k views

Get product name and sku in grid using join

Here is my code $vendorTableName = Mage::getSingleton('core/resource')->getTableName('marketplace/vendor'); $vendorproductsTableName = Mage::getSingleton('core/resource')->getTableName('...
ND17's user avatar
  • 5,161
1 vote
0 answers
353 views

Magento customer left join not returning all column from customer table [closed]

I wrote the join query with customer table, its only returning both table matched values only,instead of returning all the left table rows. The Query: $collection = Mage::getModel('customer/customer'...
senthil's user avatar
  • 1,707
5 votes
1 answer
742 views

How do I make this custom expression column I have developed for the customer grid display sortable?

I'm trying to add an expression column to collection in customer grid. But it not sortable. I'm not sure that using addExpressionAttributeToSelect or addExpressionFieldToSelect function can solve this ...
HungDQ's user avatar
  • 792
2 votes
2 answers
1k views

magento customer table join query group by make problem in pagination

I wrote the join query with customer table. the query is, when I execute this query they will return 5 records: $collection = $this->getCollection() ->addAttributeToSelect('userid') -&...
senthil's user avatar
  • 1,707
0 votes
2 answers
154 views

Complex custom collection join problem

I have created tables, models etc for an extention and can get collections from each model individually fine. Here are the tables in question: orders_table entity_id | magento_order_id | ...
Tom Burman's user avatar
6 votes
5 answers
4k views

Magento Admin Order Grid Filter by "Status" giving error while joined with "sales_flat_order" table

I am working on a project where there is custom column already installed on sales_flat_order table. I know, in order grid magento uses sales_flat_order_grid table to fetch data. I have used join ...
Adarsh Khatri's user avatar
0 votes
1 answer
855 views

how to add column to manage customers grid and it should work as filter?

I want to add news letter subscribed or not as column. but I dont have idea from which table i have to join. can you any one help me on this? class ...
sivakumar's user avatar
  • 257
2 votes
1 answer
1k views

I'm having trouble joining the customer_entity_varchar table to the sales_flat_order_grid table

A client wants a specific piece of data from the customer_entity_varchar table to display in place of the customer's last name in the Sales Order Grid. I'm trying to join the customer_entity_varchar ...
Joshua Romero's user avatar
0 votes
1 answer
501 views

join table product and product option in external script

i'm trying to join the products and product_option table by using this script <?php ini_set('memory_limit',"1000M"); ini_set('display_errors', '1'); set_time_limit(0); define('MAGENTO', realpath(...
hkguile's user avatar
  • 2,201
0 votes
1 answer
910 views

How to join the below two collection for customer & Customer Address I want to use on grid

How to join the below two collection for customer & Customer Address I want to use on grid $entityType = Mage::getModel('eav/entity_type')->loadByCode('customer_address'); $...
Magento AJ's user avatar
5 votes
2 answers
999 views

Joining table to collection doesn't work but getData shows joined fields

The problem I have joined the category product list collection (getLoadedProductCollection from Mage_Catalog_Block_Product_List) with a custom table. Because this collection is loaded from ...
philwinkle's user avatar
  • 35.8k
4 votes
1 answer
7k views

Join table to product/catalog collection to display new custom column in catalog grid

I am trying to add a column to the catalog/product grid. So far I have been able to create the column but have been unable to populate it here is what it looks like now So far I've tried this $...
engineerKev's user avatar
2 votes
1 answer
8k views

how to join three tables on every time when model load

I want to join three tables on every time when model load (for example on edit from page, on grid page in admin and detail page in front-end etc... ) in my custom module. can you please let me know ...
Lalit Kaushik's user avatar
2 votes
1 answer
2k views

join 2 collection in custom Grid Magento

join 2 collection in custom Grid Magento.I am using the below code. I want to join with sales_flat_order to get get Shipping address & Grand Total. how to do ? $customerId = $this->getRequest()...
Magento AJ's user avatar
0 votes
1 answer
3k views

Issues with join / joinField / joinAttribute (undefined method)

I'm trying to join a category with an event. Here's what I have so far: <?php $rootCategoryId = Mage::app()->getStore()->getRootCategoryId(); $categoryModel = Mage::getModel('catalog/...
Chris Klepeis's user avatar
4 votes
4 answers
9k views

How to Get Distinct Entries from Joined Tables Through Join()

This doubt aroused when I am answering one of the question that posted here. But this question is not a continuation of that question, rather a general doubt. Basically I need to get log-customer ...
Rajeev K Tomy's user avatar

1
2