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
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
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.
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.
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?
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]
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.
you need to modify the code to use the category name from the recordset:
for example:
<?php if($row_RecordsetName['CategoryColumn'] == "Small Canvases") { ?>
For some reason, all values from that record set are blank.
File attached.
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']
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.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.