Questions tagged [join-table]

The tag has no usage guidance.

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

Relationship between catalog_product_entity and cataloginventory_stock_item

I am trying to join these 2 tables together to get all the attributes I need from the group of Product Entity tables and join them with the remaining quantity in stock from the Stock Item table. ...
2
votes
1answer
764 views

Magento 2: Join EAV attribute from product attribute set on a custom flat table

Hi fellow programmers, I would like to know how to do a join on my custom flat table (i.e. discountrules), I've implemented a generic Repository based on the Pestle archive, which implements the ...
0
votes
1answer
54 views

Use join table to display data in admin grid column

How can I use join table to display second table data in admin grid? Admin grid is created using layout & block in proper manner. I used this link (how to create a grid without using ui component ...
0
votes
1answer
27 views

Magento2 : How To Get First Table Column From Join Query Result(From Duplicate Columns)

Table1 - col_name col_city col_tid Table 2 - col_id col_city In Magento2 i want col_name,col_city from Table1 And col_id from Table2 Using Join Query And col_city is in both table so i just want ...
0
votes
1answer
713 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 ...
2
votes
1answer
38 views

Join from custom table to customer_entity table and get all data customer in Magento 2

I used this code but it not working. Please help me! $customerEntity = $locationList->getTable('customer_entity'); $locationList = $this->mpSellerMapLocatorModel->getCollection(); $...
1
vote
1answer
222 views

Magento 2: How to join product collection to custom table?

example: i have a table "table_1" i want to join product collection to get the product data? but I don't know how to join product collection? so everybody can help me pls? List item
1
vote
1answer
46 views

How to add product attribute value in custom collection?

I have a custom table which contains product id, I want to add an extra attribute column. so how can I get dropdown attribute value of the product in my custom table? if the dropdown attribute is not ...
0
votes
0answers
63 views

Get custom join query using for order items collection of particular order magento 2

I want to get order items collection of particular order from custom join query magento 2 for User Order History Page.
2
votes
3answers
11k 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\...
0
votes
0answers
18 views

For heavier category(having 2000 products) ,category page takes 4-5 min to load, while for a small category( few products) it's working properly

I've used following two joins on product listing page due to which heavier category page taking 4-5 minutes to load:- Class:- vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php ...
0
votes
1answer
30 views

How can get custom table columns on product listing page using product_id of the custom table

On product listing page, I need to show visitor nearest product first. I've a marketplace site and each product have different seller and there is a custom table having seller_id and product_id ...
0
votes
1answer
34 views

Magento 2 Product Listing Issue:- You cannot define a correlation name 'mp' more than once

I'm trying to join custom table on product listing page,here is the Class and method:- Class:- vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php Method:- setCollection() Here is ...
1
vote
1answer
56 views

Magento 1: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous

I am getting the Error: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous SELECT `main_table`.*, CONCAT(soa.firstname,' ', soa.lastname,'', soa.street,'', soa....
6
votes
0answers
366 views

Join table for grid Magento 2 not working

I tried to create a join to select data for my grid table in Magento 2 but the problem I am always getting is an empty record for alias that I wanted to use in my grid. Please refer the below image: ...
0
votes
1answer
71 views

Join in magento 2 Ratings and Review

I am trying to fecth data form review and rating_option_vote. i need all values of rating and all Rating count group by Rating Id. public function getRatingSummeryByAttribute($currentProductId) { ...
2
votes
2answers
226 views

Create Admin grid from join table collection

I'm new to magento 2, I have a query to join multiple table, only 1 custom table I've made and the rest is from Magento 2, the query looks like this: SELECT marketplace_orders.entity_id as id, ...
6
votes
5answers
3k 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 ...
0
votes
1answer
76 views

Magento2 use Multiple LIKE operator in Join Query

I have used Join query,in which i'm able to fetch only one row by below query where $productId = 10 $collection->getSelect()->where('paproduct.product_id = (?)', $productId); I want to use ...
0
votes
0answers
38 views

Magento 2.2.3 Backend Admin Save.php Where Gird/Form Is a join table

How do To save data where grid and form has joint table? Ok. So I have 2 tables. employee +---------+------------------------+ | employee_id |employee_contact_id | +-------------+-------------------...
0
votes
1answer
876 views

Magento 2 Join table customer entity and customer address entity

I am trying to join customer entity table and customer address entity table. I am getting error in below code. What could be the issue $agency_name=$customerData->getDefaultShippingAddress(...
0
votes
0answers
29 views

Where can i find the device_name from which the order is placed in magento 2 db?

Need to know the list of the device names appended in the Magento platform and in which table is it rendering from? for example: "device_name": "Smartphone", "device_name": "Desktop"
0
votes
1answer
273 views

Magento 2 Convert backend admin grid to use joint table

What are the step I need to take to convert my backend admin grid to use a joint table I have my grid example with column id and name id comes from the mainTable and name from the secondtable: I ...
2
votes
0answers
52 views

Join customer_entity snd catalog_product_entity by custom attribute

I use Magento 2 I need to display some data from customer and product in admin grid panel and I wonder how to join catalog_product_entity table with customer_entity. I added custom attribute to ...
2
votes
2answers
750 views

Error Filtering grid from joined table collection

I successfully create a custom customer grid which use select join, the problem is i concat customer first name and customer last name as a new column alias, and when i filter the column it shows ...
0
votes
1answer
85 views

M2.1.9- I used the method which joining table when adding column to order grid. But it is so slow and filter function disappear

There, I used the method which joining table when adding new column to order grid. A new column is for company name and its information is from sales_order_address, not sales_order. I succeeded to ...
0
votes
1answer
148 views

How to get customer ID in Collection _initSelect method in magento2?

I want customerId in _initselect method. How can I achieve this ? protected function _initSelect() { parent::_initSelect(); $this->getSelect()->joinLeft( ['cp1' => $this->...
0
votes
1answer
47 views

Getting issues while export Attribute Description in Magento 2

Export Script to export attribute and its options. It exports attribute and its options perfectly. But I am trying to get the attribute description by joining this $select_attribs = $connection->...
0
votes
2answers
249 views

Magento 2.2 - Load eav attribute data for every product on collection load

I've created a multiselect custom eav attribute based on a flat table, so I used a dataSource, for a product everything is working fine, API (SOAP & REST), display on the product page etc but I'd ...
1
vote
3answers
958 views

How to JOIN TABLES with WHERE clause in Magento 1.9?

I want to join two tables, the customer_entity, and customer_entity_varchar. but I have no idea how to do it. This is my current query: Let's assume I the entity_id is 5 and attribute_id is 139. $...
0
votes
1answer
59 views

Magento 2: What's best way to convert MySql to Magento

I've below MySql query, I would like to change use it in Magento format. How can i do that ? SELECT customer_entity_varchar.value, customer_entity_text.value from customer_entity INNER JOIN ...
0
votes
1answer
513 views

Magento 2 : Join 2 tables in Existing collection

I've been trying to join 2 tables with the existing collection of Customers (customer_entity). I've added like below. $items->getSelect()->join('customer_entity_text as second', 'main_table....
0
votes
1answer
234 views

Magento 1.9 join table issue

I'm having an issue with Magento 1.9.2.4 trying to make a join on my collection, here's the problem: Actually I've got a custom table named product_banner which I'm getting by: $collection = Mage::...
0
votes
2answers
99 views

Update database query Magento 1.9

I have following DB Query which is coming as expected. This Query came from the plugin Abandon Carts and I echoed the select Query. I have to edit this query to get the qty of each product in the cart....
0
votes
3answers
311 views

Join Query in magento 2

The below code entry is already in DB, Now I need to add one field to customer id and want to rerun this code via programmatically. $this->getSelect()->join( ['detail' =&...
0
votes
0answers
182 views

Join a calculated column from a table to a collection

I am creating custom admin grid in Magento 1. I want to show all wishlist with some data like id, date_created etc. and also total value of each wishlist. I am working with some modified Magento 1 ...
2
votes
2answers
915 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') -&...
7
votes
2answers
10k 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 ...
2
votes
1answer
706 views

Magento 2.2 - custom product sorting issue

I have override toolbar.php for custom sorting attribute. <?php namespace Vendor\Module\Block\Product\ProductList; class Toolbar extends \Magento\Catalog\Block\Product\ProductList\Toolbar ...
0
votes
1answer
335 views

Left join order grid collection using observer method. Magento 1.9

I'm trying to add a grid to order listing table following this awesome blog which works if all code copied but I'm unable to customize it. And I want to show the data from my custom table. I've ...
0
votes
1answer
401 views

join group_price to product collection

When I get the product collection with : $collection = Mage::getModel('catalog/product')->getCollection(); I get the group_price key but it's empty. Array ( [entity_id] => 1 [...
0
votes
1answer
122 views

Magento 1: How to join these tables to get the result

$collection = $this->_prepareEntityCollection(Mage::getResourceModel('customer/customer_collection')); foreach($collection as $customer){ $_orders = Mage::getModel('sales/order')-&...
0
votes
1answer
241 views

M2.1.9 - How to add company column from `sales_order_address` into Sales/Order grid when it comes to joining tables

I was trying to add company column from sales_order_address into Sales/Order grid when it comes to joining tables. But it doesn't work well. Could you review my code? And i referred to this post : How ...
1
vote
1answer
111 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 ...
6
votes
1answer
8k 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 ...
2
votes
1answer
7k 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 ...
4
votes
3answers
7k 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 ...
1
vote
0answers
241 views

how to join Query for particular customer group and custom customer_entity_varchar attribute?

Here in my collection -> Table structure is : 1,id, mydb,table_name,INT UNSIGNED,,10,3,0 2,userid, mydb,table_name,INT UNSIGNED,,10,5,0 3,transctionid, mydb,table_name,...
1
vote
1answer
477 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 ...
1
vote
2answers
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 ...