PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 All 50 releases
← All changes | app/Models/OrderItem.php +10 -0 1.6.2 → 1.7.0 View file →
@@ -155,8 +155,18 @@
155 155 {
156 156 return $this->belongsTo(ProductDownload::class, 'post_id', 'post_id');
157 157 }
158 158
159 + /**
160 + * All reviews of the product this line item points to — keyed on
161 + * post_id, not on the item itself, so whereDoesntHave() over it
162 + * expresses "the customer never reviewed this product".
163 + */
164 + public function product_reviews()
165 + {
166 + return $this->hasMany(ProductReview::class, 'post_id', 'post_id');
167 + }
168 +
159 169 public function createItem($orderItems)
160 170 {
161 171 return $this->belongsTo(ProductVariation::class, 'variation_id', 'id');
162 172 }