Commit Graph

9 Commits

Author SHA1 Message Date
Matt-Yorkley
a91ae8947b Only query visible enterprises 2019-06-12 09:47:01 +01:00
Matt-Yorkley
45d65baf8e Improve shops performance 2019-06-12 09:47:01 +01:00
Pau Perez
c330d931ce Eager load product properties to avoid N+1
This totally removes the following N+1 query from the GET /shops request

```sql
SELECT "spree_properties".* FROM "spree_properties"
  INNER JOIN "spree_product_properties"
    ON "spree_product_properties"."property_id" = "spree_properties"."id"
  INNER JOIN "spree_products"
    ON "spree_products"."id" = "spree_product_properties"."product_id"
  INNER JOIN "enterprises"
    ON "enterprises"."id" = "spree_products"."supplier_id"
  WHERE "spree_products"."supplier_id" = 24;
```

The product properties of the corresponding enterprises are now loaded
in a single query fired from the controller.
2018-11-28 16:21:40 +01:00
Pau Perez
4608c434b4 Eager load producer properties to avoid N+1
This totally removes the following N+1 query from the GET /shops request

```sql
SELECT "spree_properties".* FROM "spree_properties"
  INNER JOIN "producer_properties"
    ON "spree_properties"."id" = "producer_properties"."property_id"
  WHERE "producer_properties"."producer_id" = 17
  ORDER BY producer_properties.position;
```

The producer properties of the corresponding enterprises are now loaded
in a single query fired from the controller.
2018-11-28 16:21:40 +01:00
Pau Perez
41d988176c Pass enterprises to inject method from controller 2018-11-28 13:54:42 +01:00
Matt-Yorkley
782a812596 Basic Embedded Shopfronts 2017-07-26 13:56:36 +10:00
Matt-Yorkley
113f6565be Enable iframes for embedded shopfronts 2017-07-26 13:56:36 +10:00
Rohan Mitchell
b37f21dce1 Remove load_active_distributors call missed by merge 2015-06-10 18:38:32 +10:00
summerscope
427f535026 Redesign big chunk of work:
> setting up pages for Shops, and shops signup, producers signup
> setting up routes for new pages
> changing fonts to Google Oswald & Roboto
> setting up homepage partials and removing partials no longer required
> changing menu links and labels
2015-04-30 18:20:17 +10:00