Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alpharder/8c1038991a456af54745 to your computer and use it in GitHub Desktop.
Save alpharder/8c1038991a456af54745 to your computer and use it in GitHub Desktop.
diff --git a/app/controllers/frontend/products.php b/app/controllers/frontend/products.php
index faa4dae..44a038e 100644
--- a/app/controllers/frontend/products.php
+++ b/app/controllers/frontend/products.php
@@ -182,6 +182,9 @@ if ($mode == 'search') {
// Set recently viewed products history
fn_add_product_to_recently_viewed($_REQUEST['product_id']);
+ // Increase product popularity
+ fn_set_product_popularity($_REQUEST['product_id']);
+
$product_notification_enabled = (isset($_SESSION['product_notifications']) ? (isset($_SESSION['product_notifications']['product_ids']) && in_array($_REQUEST['product_id'], $_SESSION['product_notifications']['product_ids']) ? 'Y' : 'N') : 'N');
if ($product_notification_enabled) {
if (($_SESSION['auth']['user_id'] == 0) && !empty($_SESSION['product_notifications']['email'])) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment