View Single Post
  #2  
Old 03-31-2017, 03:25 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: Membership by "code" and hide non-membership items

> They would like us to put a registration code on the register page that allows someone to enter
> a code. Based on the code the user enters, they would then like the user to be placed into
> a particular membership immediately/automatically.

Although this is not a complex modification, it requires more changes than can be explained here, in the forums. In a few words you should add a new field widget to the registration form, and then check its value in the controller class that adds the user.

> They have also requested that when a registered member that is part of a membership logs in, they
> only see products/categories associated with their membership
> and not the "public"/non-membership items.

The method that filter products depending on the membership condition is this one:
\XLite\Model\Repo\Product::addMembershipCondition( )

I think you should look into decorating this method from your custom module and removing the "OR membership.membership_id IS NULL" part of the condition.
__________________
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