Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Hidden Product Image By A Logo "member Only" Rate Topic   * * * * * 1 votes

 
  • enewmall
  • Newbie
  • Members
  • Join Date: 09-Oct 13
  • 9 posts

Posted 05 December 2014 - 09:07 PM #1

Hi, some one can help me how to hidden the product image with a logo " member only", because we don't want unregister customer see the product images on the each category pages, but not apply this function on the home pages, only for the category pages.

My website have the multi vendor version 4.0

Thanks

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1249 posts

Posted 06 December 2014 - 07:24 AM #2

Hi @enewmall,
The modification is similar with http://www.hungryweb...e-frontend.html

If you need help you are always welcome to contact us here http://www.hungryweb...tional_services

Keep on smiling,

---
Valentin
part of hungryweb.net

 
  • csexperts
  • Member
  • Authorized Reseller
  • Join Date: 02-Dec 14
  • 23 posts

Posted 06 December 2014 - 08:39 AM #3

Hi, some one can help me how to hidden the product image with a logo " member only", because we don't want unregister customer see the product images on the each category pages, but not apply this function on the home pages, only for the category pages.

My website have the multi vendor version 4.0

Thanks


1. Create "func.php" file in "app/addons/my_changes" with this content:

<?php

use Tygh\Registry;

if (!defined('BOOTSTRAP')) { die('Access denied'); }

function fn_my_changes_gather_additional_products_data_pre($products, &$params) {
    if (Registry::get('runtime.controller') == 'categories') {
      $params['get_icon'] = false;
      $params['get_detailed'] = false;    
      $params['get_additional'] = false;        
    }
    
    return true;
}


2. Create "init.php" file in "app/addons/my_changes" with this content:

<?php

if (!defined('BOOTSTRAP')) { die('Access denied'); }

fn_register_hooks(
    'gather_additional_products_data_pre'
);

3. Don't forget enable My changes add-on.

Best regards,
Leonid
Chief Technology Officer of CSExperts
CS-Experts.com - professional CS-Cart solutions
Skype: cs.experts
Email: sales@cs-experts.com

 
  • enewmall
  • Newbie
  • Members
  • Join Date: 09-Oct 13
  • 9 posts

Posted 06 December 2014 - 03:50 PM #4

1. Create "func.php" file in "app/addons/my_changes" with this content:

<?php

use Tygh\Registry;

if (!defined('BOOTSTRAP')) { die('Access denied'); }

function fn_my_changes_gather_additional_products_data_pre($products, &$params) {
	if (Registry::get('runtime.controller') == 'categories') {
	  $params['get_icon'] = false;
	  $params['get_detailed'] = false;	
	  $params['get_additional'] = false;		
	}
	
	return true;
}


2. Create "init.php" file in "app/addons/my_changes" with this content:

<?php

if (!defined('BOOTSTRAP')) { die('Access denied'); }

fn_register_hooks(
	'gather_additional_products_data_pre'
);

3. Don't forget enable My changes add-on.

Best regards,
Leonid
Chief Technology Officer of CSExperts

Super, thank very much. let me try.

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19589 posts

Posted 08 December 2014 - 08:41 AM #5

I think that the correct content of the func.php file should be

<?php
use Tygh\Registry;
if (!defined('BOOTSTRAP')) { die('Access denied'); }
function fn_my_changes_gather_additional_products_data_pre($products, &$params) {
		if (Registry::get('runtime.controller') == 'categories' && empty($_SESSION['auth']['user_id'])) {
		  $params['get_icon'] = false;
		  $params['get_detailed'] = false;	
		  $params['get_additional'] = false;		  
		}
	  
		return true;
}

In other case, the images will be hidden for all visitors.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • csexperts
  • Member
  • Authorized Reseller
  • Join Date: 02-Dec 14
  • 23 posts

Posted 08 December 2014 - 01:20 PM #6

eComLabs,

You're right! You are very careful! Thank you.

Best regards,
Leonid
Chief Technology Officer of CSExperts
CS-Experts.com - professional CS-Cart solutions
Skype: cs.experts
Email: sales@cs-experts.com