close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Powerstore 3...Quantities

Thread began 2/12/2010 2:57 am by derek371624 | Last modified 8/17/2010 3:38 pm by Jason Byrnes | 3290 views | 20 replies |

derek371624

Powerstore 3...Quantities

Hi

I need to show (12) as the minimum quantity available each product.
It is also important to imput and show the unit price for just one item.
Could you assist in how to achieve this ?

Thank you

Sign in to reply to this post

Eric Mittman

The minimum quantity functionality you are referring to is not a supported feature of PowerStore 3. If you wanted to add this in it would be a custom endeavor that would require you to make edits to the code on the pages.

One way that you could go about adding this in would be to put in some text near the quantity field 12 is the minimum quantity, you could also set the default value of the quantity field to be 12. You could then add a server side validation CSS Form Builder or Validation Toolkit that will check to see that the quantity is at least 12 or send the user back the page with a message for them. The last part of this would be to update the quantity column of the cart to make it non editable, this way the user would only be able to specify the quantity from the add to cart page and not set it to a lower amount later.

Sign in to reply to this post

rob294118

Category Minimum Qty

I have 2 Product Categories with minimum order quantities. How would I handle this?

Small - min order qty 3
Medium - min order qty 2

I think having the capability to set minimum order quantities in the next release of PowerStore would be huge.

Sign in to reply to this post

rob294118

Spry

I tried using a SPRY FIELD with a MINIMUM VALUE of 3 for the quantity and that worked for the SMALL category.

How would I use an IF statement... if the CATEGORY is 2 then the MINIMUM QTY is 2?

Sign in to reply to this post

Jason ByrnesWebAssist

the code to initialize the spry text field will look like:

var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:3});


the minValue setting determines the minimum value.

You could use an if statement to change that, the pseudo code would look like:

<?php if(category == 'small') { ?>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:3});
<?php } elseif(category == 'medium') { ?>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:2});
<?php } ?>[/php]

Sign in to reply to this post

rob294118

Category Minimum Qty

Excellent idea.

I created a record set to pull the categories but the code doesn't recognize the category name. The qty is always 1 no matter what the category is.

I attached the file if you wouldn't mind taking a look.

Attached Files
files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you need to modify the code to use the category name from the recordset:

for example:
<?php if($row_RecordsetName['CategoryColumn'] == "Small Canvases") { ?>

Sign in to reply to this post

rob294118

For some reason, all values from that record set are blank.

File attached.

Attached Files
files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

for one, the product options recordset code is inside an if statement that will only occur if there are simple options for the product, the recordset should be in the page head.

for two, you cant just do a simple select * from categories to get the correct category for the selected product.



You do a joined query to join the products table with the categories table via the productcategories table, and you need to filter the productid column on the ProductID querystring variable


SELECT ps3_categories.categoryname FROM
ps3_categories INNER JOIN (ps3_productcategories INNER JOIN ps3_products
ON ps3_productcategories.productid = ps3_products.productID)
ON ps3_categories.categoryid = ps3_productcategories.categoryid
WHERE ps3_products.productid = paramProdID

New parameter:
Name: paramProdID
Type: Number
Default Value: -1
RunTime Value: $_GET['ProductID']

Sign in to reply to this post

rob294118

Closer

The category name is being recognized.

My last problem is that the ADD to Cart button does not add the item to the cart now.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...