Forums / General Questions / How to have text attribute set price?

How to have text attribute set price?

Views: 974

Results 1 to 14 of 14
28 Aug 2013, 1:09 AM
#1
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

How to have text attribute set price?

I'm trying to setup a product that can have a variable price. I can set it up so that the price can be chosen from a dropdown of choices, but I need it to be entered by the user in a text field. When I setup an attribute that uses a text field it appears that Zen Cart won't use a text attribute to set the price. How can I change that? I figure I should ask here before hacking away at it, in case there's a "standard" way to implement it.

I'm experimenting with a clean install of 1.5.1 and have a good knowledge of PHP so don't be afraid to give details :cool:

Thanks!

28 Aug 2013, 1:15 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to have text attribute set price?

You can either add the Price like you would any other Attribute in the Attributes Controller or you can add a Price per letter or per word in the Attributes Controller ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2013, 2:10 PM
#3
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

Re: How to have text attribute set price?

That's what I tried and it didn't work. Have you done it successfully?

Ajeh:

You can either add the Price like you would any other Attribute in the Attributes Controller or you can add a Price per letter or per word in the Attributes Controller ...

28 Aug 2013, 2:13 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to have text attribute set price?

Yes it works fine ...

What are you using on your Attribute for Prices?

Have you an URL to the Product that you are having problems with that we could perhaps peek at?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2013, 2:15 PM
#5
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

Re: How to have text attribute set price?

The option type is TEXT. What else do you need to know? I can't give access to the backend.

28 Aug 2013, 2:19 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to have text attribute set price?

I would like to know if you go to your Attributes Controller and edit this Attribute what you see in regards to Price ...

I would also like to peek at the Catalog of your site via an URL to this Product so that I can see what this Product and Attributes look like ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2013, 2:36 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to have text attribute set price?

You appear to be attempting to use the input of the TEXT field as where the Price is entered and that is not how it works ...

A TEXT Attribute is just that ... TEXT ...

And Price is derived from the settings in the Attributes Controller for the Price or Price per Letter or Price per Word ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2013, 2:38 PM
#9
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

Re: How to have text attribute set price?

So how do I have the user enter the price?

28 Aug 2013, 2:43 PM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to have text attribute set price?

You can't, really. One workaround is to create a product with a price of $1.00, and allow the customer to select the quantity of $1 items. This is usually done to solicit donations.

28 Aug 2013, 2:44 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to have text attribute set price?

You can enter a Product Price of 1.00 and then the user can enter a quantity ...

What are you specifically trying to do on the Price?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Aug 2013, 2:53 PM
#12
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

Re: How to have text attribute set price?

I basically need to set the price to be any value programatically, but it will also work if the user enters it. It's for a product that has highly variable pricing. I've seen it done on other Zen Cart setups but I think they did some mods.

I guess it's time to start hacking.

28 Aug 2013, 3:56 PM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to have text attribute set price?

A little more info might trigger something here. Why does the product have highly variable pricing and why/how does it work that you let the customer determine the price ? Is this some sort of 'bid' system ?

28 Aug 2013, 4:00 PM
#14
quicksilverweb avatar

quicksilverweb

New Zenner

Join Date:
Oct 2012
Posts:
7
Plugin Contributions:
0

Re: How to have text attribute set price?

It's selling memberships to an educational site. It's possible for a school district to buy a membership and then the price is calculated based on how many schools of what size, then a discount is applied. The previous setup had this being fed into a text attribute that could theoretically be changed by the user but shouldn't be. There's not that many that are sold and they are ultimately checked by a human, so it's not too worrisome that the user could change it if they tried.