Hi,
How is it possible that the user can add a product to cart without choosing an attribute?
How can I warn the user to select an attribute before adding to cart?
for example image size or color or anything.
on the phoca demo it is not implemented.
how do I make the user to have to choose an attribute
-
- Phoca Enthusiast
- Posts: 61
- Joined: 04 Nov 2012, 23:40
- Location: Iran
- Contact:
- David-Spring
- Phoca Member
- Posts: 33
- Joined: 15 Dec 2020, 11:21
Re: how do I make the user to have to choose an attribute
Steps to get Product - Require Attribute to work
I did this using a new install of Phoca Cart 3.5.4 on Joomla 3.9.23
Category Audi
Product Audi A5
Click on the Attributes tab. (most of these values were already set by the Sample Data but I had the same error with color choice not being forced because the Required box was set for No and neither of the two Options were set for Default and neither of the two options had the color set ).
Title – Color
Alias – color
Required – Yes
Type Color (Select) – note that for me, I could not get Color Checkbox to work.
Options: Click Plus
First Option
Title White
Alias White
Operator Price Plus sign
Amount (to add this color option) 1000
Color: Set to #CCCCCC (white or #FFFFFF did not display well since the page has a white background and the check box is also white).
Default NO
Options: Click Plus
Second Option
Title Blue
Alias Blue
Operator Price Plus sign
Amount 2000
Color #0066cc (blue)
Default Yes.
Then SAVE.
The 4 keys are to make sure Required is set to Yes and the Type is set to Color Select (instead of Color Checkbox) and that one of the options is set to Default and that all options have a color selected.
Then check the Product View in the front end. You will see a checkmark on the blue box. If you click Add to Cart, it will add the blue car. If you want the White car, you will need to change the checkmark from the blue box to the white box. Then click Add to Cart and it will show that the white car was added to the cart.
Thank you Phoca Cart for making such a wonderful shopping cart and for providing us with tips on how to use your Shopping Cart with the Astroid Template!
I did this using a new install of Phoca Cart 3.5.4 on Joomla 3.9.23
Category Audi
Product Audi A5
Click on the Attributes tab. (most of these values were already set by the Sample Data but I had the same error with color choice not being forced because the Required box was set for No and neither of the two Options were set for Default and neither of the two options had the color set ).
Title – Color
Alias – color
Required – Yes
Type Color (Select) – note that for me, I could not get Color Checkbox to work.
Options: Click Plus
First Option
Title White
Alias White
Operator Price Plus sign
Amount (to add this color option) 1000
Color: Set to #CCCCCC (white or #FFFFFF did not display well since the page has a white background and the check box is also white).
Default NO
Options: Click Plus
Second Option
Title Blue
Alias Blue
Operator Price Plus sign
Amount 2000
Color #0066cc (blue)
Default Yes.
Then SAVE.
The 4 keys are to make sure Required is set to Yes and the Type is set to Color Select (instead of Color Checkbox) and that one of the options is set to Default and that all options have a color selected.
Then check the Product View in the front end. You will see a checkmark on the blue box. If you click Add to Cart, it will add the blue car. If you want the White car, you will need to change the checkmark from the blue box to the white box. Then click Add to Cart and it will show that the white car was added to the cart.
Thank you Phoca Cart for making such a wonderful shopping cart and for providing us with tips on how to use your Shopping Cart with the Astroid Template!
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: how do I make the user to have to choose an attribute
Hi David-Spring,
thank you very much for your investigation, instructions & help!
Kind regards
Jan, Benno, KarEm, Christine
thank you very much for your investigation, instructions & help!
Kind regards
Jan, Benno, KarEm, Christine