Post by 4asbm » Wed May 04, 2011 4:55 am

I am working on an opencart website for a client. This client wants to sell products which are suitable for all customers and he wants to sell a few products that may only be visible on the website to certain verified customers (military and police)

Does anyone know if there is a way make this possible ?

Thanks !

Premium Templates for Opencart
http://www.opencarttemplates.com


New member

Posts

Joined
Mon Sep 13, 2010 10:45 pm

Post by mandamexico » Thu May 05, 2011 1:43 pm

With the set up on my site I dont assign the products to a category and they become "hidden". They cant even be searched for either. Just dont assign them to a product category and use the direct url so they can be purchased. Create a customer user group and select this group for the product.

Hopefully theres a better way to do it...maybe someone else has an idea but this is how I work around it.
Cheers,

Chris

My Extensions

OpenCart Developer (OCD) Tools

Donate - If I ever helped you.


User avatar
Active Member

Posts

Joined
Mon Jun 29, 2009 10:14 am
Location - Los Angeles, CA

Post by mystifier » Sat May 07, 2011 5:47 am

This Extension allows Product Categories to be restricted to Customer Groups.

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by 4asbm » Sat May 07, 2011 5:54 am

thanks, i will buy that plugin !

Premium Templates for Opencart
http://www.opencarttemplates.com


New member

Posts

Joined
Mon Sep 13, 2010 10:45 pm

Post by lloydmedley » Wed May 25, 2011 7:44 pm

Just what we're looking for thanks!

EDIT:

Actually, its not quite :( We need potential customers to be able to view the products that they will be granted access to if they change their account to trade, otherwise they don't know what they are missing out on. Does anyone know if this is possible?

If I forgot to mention: it's OpenCart Vv1.5.6


New member

Posts

Joined
Tue Mar 29, 2011 11:18 pm

Post by lloydmedley » Fri May 27, 2011 8:51 pm

For future reference (to help myself or anyone else searching for the same thing in teh future) I found the soultion here

http://forum.opencart.com/viewtopic.php?f=112&t=4952

Particularly this post:
rog_ashbury wrote:I did a post on this. I use a small modification of a suggestion put up by Qphoria which was to detect 0 currency values and then insert a text string instead. The trouble with this was it did the same when shipping cost was zero and when tax was zero also and looked odd. So here's what I did.

1. EDIT: system/library/currency.php (or system/helper/currency.php for certain versions)

2. FIND:

$string = '';


3. BEFORE, ADD:

if ($format && $value > 99999) {
return 'YOUR TEXT';
}

That's it! This one change does all. Now what you have to do is put a price of 999999 (note five 9s in the above code and six 9s in the product price) for all the products where you want your text to appear instead of the price. The reason for the five 9s compared to the six 9s is so the associated tax figure in the product display is also modified and it looks sensible.

Hope that helps

Roger
So basically it was just two lines of code that did the trick perfectly for us!

Edit system/library/currency.php
find $string = ''; and add this before it
if ($format && $value > 99999) {
return 'TRADE ONLY';
}
Then change the default price to 999999 and add a new group that are allowed to see the correct price (and obviously change the rpice to the correct amount for that group)
Thanks rog_ashbury!

If I forgot to mention: it's OpenCart Vv1.5.6


New member

Posts

Joined
Tue Mar 29, 2011 11:18 pm

Post by mwd » Thu Sep 08, 2011 11:48 am

This is interesting.
I've been looking for something like this to hide pricing for certain wholesale only items.

This mod only hides the price, but doesn't prevent it from being added to the cart, right?

Use it? Like it? Want to support it but don't know how? Send a donation to show your appreciation.
Daniel's PayPal address - donate@opencart.com
Qphoria's Paypal address - qphoria@gmail.com


mwd
Active Member

Posts

Joined
Sat Jan 08, 2011 11:40 pm

Post by lloydmedley » Fri Sep 09, 2011 12:06 am

That's right, and you'd be surprised how many people are dull enough to sign up for a personal account not trade, click something that clearly states TRADE ONLY as the price and then ring up to tell/ask us why paypal is trying to charge them £999999.99! Grr

If I forgot to mention: it's OpenCart Vv1.5.6


New member

Posts

Joined
Tue Mar 29, 2011 11:18 pm

Post by mwd » Fri Sep 09, 2011 3:31 am

That's what I thought/was afraid of.

Q has a vQmod that disables the add to cart button for out of stock items in this thread: http://forum.opencart.com/viewtopic.php ... 3&p=194120

I'm hoping he can combine that idea with this one to disable the add to cart button if the price is set to the 999999 "Trade Only" price also.
Unfortunately I don't know enough about PHP to figure it out for myself, but it seems that between this code and that one it should be possible.

Use it? Like it? Want to support it but don't know how? Send a donation to show your appreciation.
Daniel's PayPal address - donate@opencart.com
Qphoria's Paypal address - qphoria@gmail.com


mwd
Active Member

Posts

Joined
Sat Jan 08, 2011 11:40 pm

Post by lloydmedley » Fri Sep 09, 2011 6:40 am

Definitely possible. Could be useful for our store too so I might have a little tinker tomorrow. I only dabble in php though so probably beyond me lol :(

If I forgot to mention: it's OpenCart Vv1.5.6


New member

Posts

Joined
Tue Mar 29, 2011 11:18 pm
Who is online

Users browsing this forum: No registered users and 43 guests