0

I want to get the collection of this table how can I do it???

catalog_product_entity_tier_price

1
  • You want specific product Tier prices? Commented Dec 21, 2021 at 5:15

1 Answer 1

0
public function getProductCollectionTot() {
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*');

        $collection->getSelect()->join('catalog_product_index_price as price_index', 'e.entity_id = price_index.entity_id');    // Add this join statement
        $collection->getSelect()->join('catalog_product_entity_tier_price as tier', 'price_index.entity_id = tier.entity_id');

        $collection->addFinalPrice()
            ->addMinimalPrice()
            ->getSelect()
            ->where('tier.all_groups = 0')
            ->where('price_index.Tier_price < price_index.price');

        return $collection;
    }
1
  • Thank you so much my friend :) Commented Dec 29, 2021 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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