Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Category Appear To All User

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-05-2016, 08:40 PM
 
vigneshkutty vigneshkutty is offline
 

Member
  
Join Date: Jul 2016
Posts: 24
 

Post Category Appear To All User

In My X-Cart 5 Store, i Set Membership Level To Category. i know, if i set
This, only That Membership User can See that Category in Front End. I need To
Customize to See category by all of my user ( either login or Guest).

Kindly Suggest Me How To Create This Customize Module or Give Some Reference
To Do it...
__________________
kutty
Reply With Quote
  #2  
Old 08-08-2016, 05:33 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Category Appear To All User

Kutty,
We might need some more information in order to answer this correctly. What are you expecting to happen? If you restrict a category to a certain membership, then it is not shown to users without that membership. This is the normal behavior. If you want all users to access it, you can remove the restriction.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 08-08-2016, 05:51 AM
 
vigneshkutty vigneshkutty is offline
 

Member
  
Join Date: Jul 2016
Posts: 24
 

Default Re: Category Appear To All User

Hi totaltec,

Yeah I restrict a category to a certain membership, But I want Shown That Category to all User and Guest.

Because My Requirement is, That Category Shown to all User and Guest. if Normal User Or Guest Trying To buy Product Under that Category then I will Show Alert Popup And not Allowed to Add to Cart ..

Can you Suggest me What I do to ???

Looking forward to your reply.

Thanks,

Kutty
__________________
kutty
Reply With Quote
  #4  
Old 08-09-2016, 07:00 AM
 
vigneshkutty vigneshkutty is offline
 

Member
  
Join Date: Jul 2016
Posts: 24
 

Default Re: Category Appear To All User

Hi Team,

I just Develop Module Customization that shown All Categories to All User Even-through it has Specific Membership Level..

But I need one more Module in that When User Add product To Cart Then i need To Check Whether User is certain membership and Product Category also have certain membership ,
In that i find Membership level of user But I can't Find Product Category Membership Value in my New Customize Module Kindly Suggest on this...


Looking forward to your reply.

Thanks
Kutty
__________________
kutty
Reply With Quote
  #5  
Old 08-09-2016, 07:42 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Category Appear To All User

You should look into decorating the \XLite\Controller\Customer\Cart::doActionAdd() method and adding your check there.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #6  
Old 08-09-2016, 11:13 PM
 
vigneshkutty vigneshkutty is offline
 

Member
  
Join Date: Jul 2016
Posts: 24
 

Default Re: Category Appear To All User

Hi Team,

Kindly Suggest me , How To Get Value of Current Product Category Membership Value For That What i want Call, Because i Want To Check that Only...
Looking forward to your reply.

Thanks,
__________________
kutty
Reply With Quote
  #7  
Old 08-15-2016, 07:32 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Category Appear To All User

You can get the membership level of the user who is signed in with this:
PHP Code:
$id = \XLite\Core\Auth::getInstance()->getMembershipId(); 

As for the the membership level of the category being viewed - it is better to ask the developer who made the custom module.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:45 PM.

   

 
X-Cart forums © 2001-2020