Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Nov 2007
    Posts
    17
    Plugin Contributions
    0

    cart error Attribute Price to Appear in Shopping Cart

    How can I accomplish this?

    I need to start with a base pice of lets say $600. Then allow the customer to add on options such as an upgraded case for $300 and some fabric or graphics for another $600.

    I set up the attributes fine and can get the proper price to appear in the shopping cart. HOWEVER, its quite a shocker for the customer to start with a product that only cost them $600 and end up with a shopping cart with a total of $1500. I'd like to have the shopping cart show how much each of the attributes they selected cost and how we arrived at the end total.

    This way they don't have to hit the back button to re-calculate their spending and the totals.

    Your help is sincerely appreciated!

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attribute Price to Appear in Shopping Cart

    You would have to re-write the whole section of the shopping cart to display these amounts ...

    This can get rather complex in changing the way the display works ...

    While it is not impossible, it could be done ... just a lot of work ...
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    You might want to have a look in our downloads section for the Javascript price updater.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Jul 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    you got a specific download in mind? i can't seem to find any that do that...

    it's frustrating, it seems like something that more people - if not everyone - would want!

    anyone got any other ideas? i have to have this feature in my site!

    thanks, ricky

  5. #5
    Join Date
    Mar 2007
    Posts
    77
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    This was a long time ago, but it's top of google for "zen cart itemize attributes", so I'll give a fix here to save people the trouble:

    tpl_shopping_cart_default.php

    Comment out:
    Code:
    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
    and insert this:
    Code:
    if((int)$value['options_values_price']){ $price=money_format('%i', $value['options_values_price'] ); }
    if($price){ $display_price=" (".$value['price_prefix'] . " $" . $price . ")"; }
    echo '<li>' . $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']) . $display_price . '</li>';
    on includes/classes/order.php, comment out:
    Code:
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value']);
    and insert this:
    Code:
    if((int)$this->products[$i]['attributes'][$j]['price']){
        $price=money_format('%i',$this->products[$i]['attributes'][$j]['price']);
        $display_price=" (".$this->products[$i]['attributes'][$j]['prefix'] . " $" . $price . ")"; 
    }
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value'] . $display_price);

  6. #6
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: Attribute Price to Appear in Shopping Cart

    Thanks sitehatchery!

    That was a really cool and useful answer that I learned something from!

  7. #7
    Join Date
    Mar 2007
    Posts
    77
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    Thanks!

  8. #8
    Join Date
    Nov 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    Thank you sitehatchery for the code!

    It does insert the attribute prices, but it appears to insert even if the selected attribute does not have a price associated with it.

    That is, my regular t-shirt that costs $10 also shows the additional $2.00 that is charged on the x-large. Though, the total price is correct.

    Not sure if I made the error here, or if it is supposed to work this way and just isn't ideal for my situation....?

  9. #9
    Join Date
    Mar 2007
    Posts
    77
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    I should have initialized $display_price and $price before the code was executed:

    $display_price='';
    $price='';

  10. #10
    Join Date
    Nov 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Attribute Price to Appear in Shopping Cart

    It worked, thanks again!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 12 Apr 2015, 10:31 PM
  2. v151 Attribute listing price on shopping cart page
    By k1ra in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 21 Sep 2014, 12:36 AM
  3. base price without attribute price in shopping cart
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Dec 2011, 06:00 AM
  4. Attribute price doesn't show in shopping cart
    By hedera in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 30 Jan 2010, 12:52 PM
  5. Attribute price detail on shopping cart
    By arielon in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 May 2008, 08:45 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