logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
micahsdads1402  
#1 Posted : Sunday, November 20, 2016 3:35:52 AM(UTC)
micahsdads1402

Rank: Newbie

Groups: Registered
Joined: 11/20/2016(UTC)
Posts: 3
New Zealand
Location: Auckland

Dave,

I need to set it up so that when a reseller purchases, the total qty purchased is set to a minimum value before they can purchase.

Before I start digging around in the code, can you point me to the best place to do this? I suspect I can do it in the template.

ie, set it up with java so that the buy now button doesn't display (or similar until the cart has a total qty reaching the minimum.

Am I thinking the right way?

John.
leedavi  
#2 Posted : Sunday, November 20, 2016 8:51:52 AM(UTC)
leedavi

Rank: Administration

Groups: Registered, Administrators
Joined: 11/6/2016(UTC)
Posts: 340
United Kingdom
Location: France

Was thanked: 28 time(s) in 28 post(s)
Yes, that's the easiest way, although you'll have no server side protection from hackers directly tryin to add less than the minimum. For that you'd need to create a plugin, but I doubt you need to do that?

So add some JS to the "NBS_ProductDisplayDetail_head.cshtml" template

which hides the "addtobasket" class in "NBS_ProductDisplayDetail.cshtml" template when the "selectedaddqty" class tectbox is less that the required amount.

You can also alter the default amount on the textbox:

@TextBox(info, "genxml/textbox/selectedaddqty", "class='quantity selectedaddqty' style='width:21px'", "1")

It's proabbly also best if you change the theme templates to either create you own template folder and make the module use that, which contains only the changed temnplates (all other templates will default back the classicrazor) or create a "Themes/ClassicRazor/default" folder at portal level, which contains your templates. Doing this will mean your templates will not be overwritten by any upgrade.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.041 seconds.