Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2008
    Posts
    4
    Plugin Contributions
    0

    Default Adding Shopping Cart with options total to Products Page

    Is it possible to add the shopping cart (like what's on the shopping cart page) to include it on the Products page. I want my customers to select a product, choose extra options, and have the shopping cart live update the total with the options the customer has selected to show.

    I like the shopping cart on the sidebox but it only shows the total and not the options the customer has selected.

    Can I add some kind of php includes to the product display page -- if so what would the code look like.

    Any ideas would be great.

  2. #2
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    you should start by viewing the code found in the file:

    includes/templates/template_default/templates/tpl_shopping_cart_default.php

    (keep in mind your template name if applies)

    this is the file that drives the shopping cart. you can probably do a watered down version of this file, save it as another piece of php that you add to your product information display page as a require. or you can even just use the override system and embed the new code into your existing one, that file is in the same area in the system look for the file name:

    tpl_product_info_display.php
    hmmn. really?

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

    Default Re: Adding Shopping Cart with options total to Products Page

    Hello Elastic,

    I'm trying to do that but can't seem to find the bit of code to drive what I want to do. Let me rephrase what I want to do.

    I am trying to create a showcase site (horse trailers) with prices and have the customer choose different options (interior, exterior, etc.) and then once the customer picks the options they want the price will recalculate to reflect the additional options. I really don't want a shopping cart but not sure how to do it otherwise.

    Suggestions - please.

    Thanks.

  4. #4
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    So what you are looking for would be like the computer sales sites ie dell.com you chose the base model, then are send off to the next page to select/modify the components, add larger hard drive, more ram, programs and so on .. as you select/deselect the components the total in is dynamically changing somewhere on the side.

    As is, Zen cart can’t do that.

    I’m not a programmer sorry so I can’t tell you how to fix the code, but you might have a few alternatives.

    If you don’t have too many of these different options what seems the simplest one is to program this as attributes.

    So you have your base horse trailer with price and,

    Attribute 1: Exterior
    Option 1 – price
    Option 2 – price
    Option 3 – price

    Attribute 2: Interior
    Option 1 – Price
    And so on

    The client selects one of the trailers and then looks at the attributes and options available for modification of such. Attributes give you an option for images, and if you need those larger you might need to consider some of the mods that handle that.

    The only thing here is the updated price. So if you really want that to change on the product page as attributes are selected and not only when the customer hits the buy button and is sent to the shopping cart then that code would need to be added.


    Alternative 2
    more complex and more code rewrite:

    Set up multiple categories with multiple products.

    Trailers with all the base trailers then one each for of the options.

    So you would have Trailer category with products
    Trailer 1
    Traler 2

    Then Interior category with products for
    Interior for Trailer 1
    Interior for Trailer 2

    And so for all the options.

    The option products would each have the different options for THAT Trailer set up in attributes with the price for it, images and so on.

    Us a mod that hides the Categories from menus. (check the downloads it’s available and it works nice) Hide all the Option categories from the menu. You don’t want the client going separately to browse. He should only be able to see the base trailers on the menu to pick from.

    The idea here is to force the system to send the customer from category/product to category/product in a sequence instead to the shopping cart each time they click buy.

    So a customer selects a base trailer, clicks buy and is sent to the Product with the exterior settings for THAT trailer. “Please select exterior”. From there to interior and so on. Each time he clicks buy, the amount for that option is added to the shopping cart, so he has an idea of the running total in the side box.

    Once he is done with all the options he lands at the shopping cart.. then he can click on any of the options to go back and make changes if so desired.

    As I said a lot more complex to change the code, lots of issues to consider. Like how to deal with the client clicking the shopping cart in the middle of the process? How to stop him or return him to the right place. Maybe disable it unless the condition that all the Option Products are in the shopping cart even if it is the 0$ no change option. “Please complete your selection first” or something like that. And then just the basic, how to force one product to send you to the specific next in the sequence.

    Anyway, just some ideas, it was an intriguing question, I read it yesterday and it was running through my mind while I was driving today. Hope it helps with the possibilities of what you might need to do.

    Good luck
    nev

  5. #5
    Join Date
    May 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    Thanks Nev for offering some ideas -- but I still need to figure out how to set it up so the store is in showcase mode without a shopping cart. And I really need the store to have categories with options and then have the shopping cart live update the totals.

    Maybe I am asking too much from Zen Cart -- it's a great and easy to use program but I wish I could configure this last piece to make my idea work. I am certain someone with more knowledge of PHP and how to include the shopping cart on the product page could do it - but I am lost.

    If anyone else has ideas please let me know. This has been a great place to learn and share the power of Zen Cart.

  6. #6
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Adding Shopping Cart with options total to Products Page

    I like the shopping cart on the sidebox but it only shows the total and not the options the customer has selected.
    http://www.zen-cart.com/forum/showthread.php?t=91738
    Thread above should help

  7. #7
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    Misty
    Thanks for that one, saving that thread and code, I can see adding it to my site.

    However that will still only display the list of options chosen once the whole item with all the options/attributes has been added to the cart. It could be added if you go with the second alternative that I gave above, but that alternative is asking for some major code changes.

    What Phil seems to be looking for is a dynamically updated total BEFORE the item is in the cart, dependant on the attributes selected.

    Basically go to dell.com pick any desktop /laptop and you have exactly the cart he wants. As you change the choices on the bullets the price in the right side bar updates. Then you go to next component and so on till you picked your choices on all of them.

    So in this case if it’s all on one product page when you open the Base product you would see the base price displayed. Of lets say 100$

    You have attribute Interior with
    Option 1 – 0$ no change
    Option 2 – 50$
    Option 3- 70$

    When you select Option 2 (50$) the base price displayed for the product would automatically change to 150$

    Second attribute for the Product is Exterior
    Option 1 – 0$ no change
    Option 2 – 30$
    Option 3 – 40$

    You now add Option 3 and the total changes to 190$. All this happens on the product page BEFORE you click the BUY button and before the product is in the cart at all.

    So you need code to calculate and display the combined price, and probably some java to make it dynamic without having to refresh the page.

    And this was the 1st alternative I described before. You can do this with attributes if you don’t have to many, so the single product page is not overwhelmed. You would however need to have the code for the dynamic total added. Make a new sidebox, or reprogram the shopping cart one to show this total instead of the actual shopping cart.

    The 2nd alternative doesn’t have that dynamic total since it is less necessary. The base Product price and all the previously selected Options prices would already be listed and calculated in the side shopping cart (and if you don’t want to call it a shopping cart just rename the box to something else “selection total” whatever suits you or don’t have any name) and you don’t have to call the button a BUY button name it whatever you want “continue to next section” “go to next component”

    The client won’t know/see the programming behind so to them this will look like options for the base product not separate products. But as I said before this alternative asks for a lot more change to code. And all those issues to think that I posted before.

    This is the closest you can get to it with Zen Cart that I can see. Sorry I can’t help with the code, my PHP is in the infancy stages, but if you ever get the dynamic total working post the code it would be a great option to have.

    Good luck
    nev

  8. #8
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Adding Shopping Cart with options total to Products Page

    looking for a dynamically updated total BEFORE the item is in the cart, dependant on the attributes selected.
    Dell option is not currently available in zencart.. could probably be
    achieved with custom coding..if an imperative requirement,
    then suggest posting
    request for zencart coder in ZenCart forum - Commercial Section.

  9. #9
    Join Date
    May 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    Thanks Misty for the suggestion -- I tried that option and yes I can display the selected options in the sidebox -- that could work if the add to cart button was instead "update cart" button.

    Maybe I am approaching this from the wrong angle. I really like the way the product is diplayed and options shown and totalled on the shopping cart page -- so would it be possible to just have some kind of php includes on the product page and make the add to cart an update cart -- I could remove the link to go to check out and everything should look and function like a showcase mode with prices -- but with a way to update prices for products with options.

    Let me know what you guys (gals) think.

    Thanks.

  10. #10
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Re: Adding Shopping Cart with options total to Products Page

    Just ran across a dell.com style customization site running in Zen Cart with full features, automatic cart price update in product page as you select components and change your mind.

    So it can be done.

    And wouldn’t we all want to know how it was done

    http://www.compevolve.com/



    Have a look.

    nev

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Adding products with multiple attributes shopping cart
    By TAIHCM in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Feb 2012, 08:20 PM
  2. Question about adding products to my cart from the shopping cart page
    By audleman in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 31 Aug 2010, 07:37 AM
  3. Replies: 2
    Last Post: 7 Oct 2009, 05:33 AM
  4. Add shipping total to shopping cart page
    By jerusalem_spider in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 8 Dec 2007, 06:58 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