Skip to content

Commit a6d3611

Browse files
committed
Added like parameter to be used as alternative to search if string search is needed instead of full text
1 parent 9e4ef37 commit a6d3611

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/component/posts.php

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Posts extends ComponentBase {
5050
'taxonomy_item_id' => NULL,
5151
'taxonomy_item_slug' => NULL,
5252
'search' => NULL,
53+
'like' => NULL,
5354
'admin_id' => NULL,
5455
//archive
5556
'month' => NULL,
@@ -176,6 +177,7 @@ function results() {
176177

177178
//rfc
178179
$post['pubDate'] = date('r', strtotime($post['created_at']));
180+
$post['modDate'] = date('r', strtotime($post['updated_at']));
179181

180182
//url
181183
$url = ['slug' => $post['slug'], 'post_id' => $post['post_id']] + $language;

app/component/products.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class Products extends ComponentBase {
4848
'product_image' => true,
4949
'product_id' => [],
5050
'search' => null,
51+
'like' => null,
5152
'slug' => null,
5253
'related' => null,
5354
'variant' => null,
@@ -63,7 +64,7 @@ function results() {
6364
if ($page = $this->options['page']) {
6465
$this->options['start'] = ($page - 1) * $this->options['limit'];
6566
}
66-
67+
6768
if ($this->options['filter']) {
6869
foreach ($this->options['filter'] as $name => $values) {
6970
if ($name == 'manufacturer_id' || $name == 'vendor_id') {
@@ -135,9 +136,10 @@ function results() {
135136

136137
//rfc
137138
$product['pubDate'] = date('r', strtotime($product['created_at']));
139+
$product['modDate'] = date('r', strtotime($product['updated_at']));
138140

139141
$url = ['slug' => $product['slug'], 'product_id' => $product['product_id']] + $language;
140-
$product['url'] = url('product/product/index', $url);
142+
$product['url'] = url('product/product/index', $url);
141143
$product['add_cart_url'] = url('cart/cart/add', ['product_id' => $product['product_id']]);
142144
$product['buy_url'] = url('checkout/checkout/index', ['product_id' => $product['product_id']]);
143145
$product['add_wishlist_url'] = url('user/wishlist/add', ['product_id' => $product['product_id']]);

0 commit comments

Comments
 (0)