Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    27
    Plugin Contributions
    1

    Default Attribute Values

    Hi

    Does anyone know how to get the value of a text attribute from the\includes\classes\shopping_cart.php file, so I I have a text attribut on the product page and a person enters say '1' in that box how can I capture that value in the shopping_cart.php file, I know you can get it in /includes/modules/shopping_cart/header_php.php but don't need it in shopping_cart.php.

    Thanks
    Maxell

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Attribute Values

    What are you trying to do with that value. i see it is a numerical value. are you trying to use it to perform some additional calculation(s)?

  3. #3
    Join Date
    Nov 2009
    Posts
    27
    Plugin Contributions
    1

    Default Re: Attribute Values

    Quote Originally Posted by fairestcape View Post
    What are you trying to do with that value. i see it is a numerical value. are you trying to use it to perform some additional calculation(s)?
    Hi I need the values to calculate X x Y to get a price and display in the cart, I have got everyhting else to work I just need to get the figures from a text attrribute field.

    maxell

  4. #4
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Attribute Values

    Quote Originally Posted by maxell6230 View Post
    Hi I need the values to calculate X x Y to get a price and display in the cart, I have got everyhting else to work I just need to get the figures from a text attrribute field.

    maxell
    Get in touch with SWGUY (Scott Wilson). He has developed better systems for calculating values using attributes.

    If you use a TEXT input, then the value will be recognised as text. If a customer puts an alpha character into the field, or a "string" that is not strictly a number, then you will get errors, and probably confuse your customers. As it is a TEXT field, designed to accept both alpha and numeric input (which it interprets as TEXT anyway), you risk the result of a NaN occurrence (Not a Number) in your subsequent calculations.

  5. #5
    Join Date
    Nov 2009
    Posts
    27
    Plugin Contributions
    1

    Default Re: Attribute Values

    I have seen the software guys stuff, the thing is the mod is so close to working. If I use drop down boxes it gets the value fine and works really well. It just if I use a text box the value does not seem to be in shopping_cart.php. Regarding the NaN error, the user cannot continue to the checkout until a correct numerical value is entered, so this would not be an issue. The reason I need the value in shopping_cart.php is because to display the correct price based on X x Y I have to make a calculation other wise the value in the unit column is incorrect but as I say this all works fine when using dropdown boxes, I must be able to get the value of the text box from somewhere.
    Maxell

 

 

Similar Threads

  1. v155 Attribute controller - error message when adding attribute values
    By rustwood in forum General Questions
    Replies: 8
    Last Post: 11 Jul 2016, 10:26 PM
  2. Copy attribute values to a different attribute name
    By pageblair in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 12 Jul 2010, 05:24 PM
  3. Linking attribute values to to product values (for custom gift baskets)
    By peaceviddie in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 13 Jul 2008, 09:22 PM
  4. attribute values
    By plus200 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Nov 2007, 07:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR