Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Added product type to url generation to use correct route

givanzddc6d3d7b903
diff --git a/system/traits/product.php b/system/traits/product.php
index 74bbbac..0d0d3ac 100644
--- a/system/traits/product.php
+++ b/system/traits/product.php
@@ -84,7 +84,8 @@ trait Product {
$product['modDate'] = date('r', strtotime($product['updated_at']));
$product['lastMod'] = date('Y-m-d\TH:i:sP', strtotime($product['updated_at']));
- $url = ['slug' => $product['slug'], 'product_id' => $product['product_id']] + $language;
+ $url = ['slug' => $product['slug'], 'type' => $product['type'], 'product_id' => $product['product_id']] + $language;
+
$product['url'] = url('product/product/index', $url);
$product['add_cart_url'] = url('cart/cart/add', ['product_id' => $product['product_id']]);
$product['buy_url'] = url('checkout/checkout/index', ['product_id' => $product['product_id']]);