ProStores Discussion Board  

Go Back   ProStores Discussion Board > Product Discussion > Promotions and Merchandising

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2009, 05:08 PM
RonNYC RonNYC is offline
Member
 
Join Date: Sep 2009
Location: New York City
Posts: 33
Default Attributes

I have a product which has two size attributes and associated prices. That works OK. I want to add another service (these are fine art prints), matting. I tried using an option, but there is no room to tell the buyer what to do: You can say, "Please mat my print" but there is no room to tell the buyer that any text in the box below triggers this. A radio button would be nice.

So, one of the prostores people suggested an attribute. I did that, but now it replaces the size attributes.

What do?

RON
Reply With Quote
  #2  
Old 10-22-2009, 08:49 PM
winterdd winterdd is offline
Member
 
Join Date: Dec 2007
Posts: 53
Default

I don't know what your coding skills are, but I used options to drive additional "attributes and cost" as you mention. What I do is hide the option field, and display my own html elements (radio, dropdown, etc). When the person adds the item to the cart (clicks the add to cart button), I set the value of the hidden option using javascript, and prostores normal pricing functionality takes over from there. It works fine for me, but requires some comfort with coding.
Reply With Quote
  #3  
Old 10-23-2009, 07:58 AM
RonNYC RonNYC is offline
Member
 
Join Date: Sep 2009
Location: New York City
Posts: 33
Default

I can code (mostly in Java and C# with some HTML and Unix shell). Can you send me an example of how you do it (code snippet)? I probably won't do this for the first public version, but soon after.
Reply With Quote
  #4  
Old 10-23-2009, 10:30 AM
winterdd winterdd is offline
Member
 
Join Date: Dec 2007
Posts: 53
Default

Here are the basics (this all happens in the product detail/add to cart templates. Please note that I had to merge the Product Detail and Add to Cart templates, so this is all in one template for me):

1. Add the custom service fields to the form and make them hidden.
Code:
<input type="hidden" name="custom1" id="custom1"/>
2. Add whatever HTML elements you want to your form to gather user input. For example:
Code:
<select id="matteChoice" name="matteChoice">
    <option value="">Please Select</option>
    <option value="None">No Matte</option>
   <ss:if test="$product.customService1Enabled">
	<ss:if test="$product.customService1Fee <> 0">
		<option value="Matted">Matted (add <ss:value source="$product.customService1Fee"/>)</option>
	<ss:else/>
		<option value="Matted">Matted (Free!)</option>
	</ss:if>
   </ss:if>
</select>
3. Add a javascript function call to the "Add to cart button". I do this anyway to validate the user's input. In that function set the value of the custom service field, like:
Code:
switch (document.getElementById('matteChoice')[document.getElementById('matteChoice').selectedIndex].value)
{
	case '':
		alert('You must select your Matte!');
		document.getElementById('matteChoice').focus();
		return(false)
		break;
	case 'None':
		document.getElementById('custom1').value = '';
		break;
	case 'Matted':
		document.getElementById('custom1').value = 'Matted (add $15)';
		break;
}
Hope this helps!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:46 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.