Forums / General Questions / Get text Attribute from within shopping_cart.php

Get text Attribute from within shopping_cart.php

Views: 1,227

Results 1 to 3 of 3
20 Apr 2012, 7:16 PM
#1
maxell6230 avatar

maxell6230

New Zenner

Join Date:
Nov 2009
Posts:
27
Plugin Contributions:
0

Get text Attribute from within shopping_cart.php

Hi Folks

Does anyone know how I can get the value of a text input from within the function calculate(), which is in shopping_cart.php. I get it fine if its a drop down list etc but if it is a text input I can't seem to capture the content of the text input.

Eg. product has a textinput box call test and the user entered 7, when the user clicks add to cart the value 7 appears in the basket page, I just need to be able to capture thaty number 7 in function calculate(), which is in shopping_cart.php so I can manipulate it.

Thanks in advance
Maxell

21 Apr 2012, 3:55 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Get text Attribute from within shopping_cart.php

Look in the file:
/includes/modules/shopping_cart/header_php.php

and find the area around line 109:

      if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID) {

The content of the value will be in the:
$attr_value

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!

25 Apr 2012, 10:07 PM
#3
maxell6230 avatar

maxell6230

New Zenner

Join Date:
Nov 2009
Posts:
27
Plugin Contributions:
0

Re: Get text Attribute from within shopping_cart.php

Ajeh:

Look in the file:
/includes/modules/shopping_cart/header_php.php

and find the area around line 109:

  if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID) {
> 
> The content of the value will be in the:
> $attr_value

Thanks, the $attr_value has the values in that I want, the only thing is how do I get those values into shopping_cart.php as I need to capture the values in this module to times and add to cart (the cart bit works just need the values).
Thanks
Maxell