Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2016
    Posts
    6
    Plugin Contributions
    0

    Default Retrieving Product name/s and price/s in Cart

    Hi all, first timer to ZC but seasoned dev. I'm trying to retrieve all item names and prices of all products in cart - if there are any, and display them in the sidebar. I have tried get_products() with no success. My ZC version is the latest.

    Anyone know how to achieve this? If there a built function that I can call?

    Thank you all!

    -S

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Retrieving Product name/s and price/s in Cart

    Quote Originally Posted by SimSerge View Post
    Hi all, first timer to ZC but seasoned dev. I'm trying to retrieve all item names and prices of all products in cart - if there are any, and display them in the sidebar. I have tried get_products() with no success. My ZC version is the latest.

    Anyone know how to achieve this? If there a built function that I can call?

    Thank you all!

    -S
    Turn on the shopping cart sidebox.....
    admin->Tools->Layout Boxes Controller
    Turn ON sideboxes/shopping_cart.php

    or have I missed the point of what you are trying to do?

  3. #3
    Join Date
    Aug 2016
    Posts
    6
    Plugin Contributions
    0

    Default Re: Retrieving Product name/s and price/s in Cart

    Gilby, pardon my ignorance. I was not aware of that feature will try that and see if it meets my intentions. All I basically need is a list of "in cart" products and their pricing to display on a place of my choosing....I used the sidebar as an example, but that's the basic idea.

    -S

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Retrieving Product name/s and price/s in Cart

    Your post suggests that you wish to display data "while shopping". But if perchance you're referring to *after* shopping, to access the data of the purchase for display via affiliate/analytics tools see https://www.zen-cart.com/content.php...filiates-Tools
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2016
    Posts
    6
    Plugin Contributions
    0

    Default Re: Retrieving Product name/s and price/s in Cart

    DrByte, I'm more interested in the following situation. Visitor is browsing site and adds a product to cart and continues shopping. He/she adds more items to cart, and at any moment if they need to see what is in the cart, they can just look at the sidebar instead of having to browse away from their current product/page.

    -S

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Retrieving Product name/s and price/s in Cart

    Quote Originally Posted by SimSerge View Post
    DrByte, I'm more interested in the following situation. Visitor is browsing site and adds a product to cart and continues shopping. He/she adds more items to cart, and at any moment if they need to see what is in the cart, they can just look at the sidebar instead of having to browse away from their current product/page.

    -S
    Gilby's post shows you how to do that with the built-in sidebox.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. How do I add Manufacturer to Product Info Up top (by product name and price)
    By mikeislearning in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Sep 2011, 06:37 PM
  2. Removing gap beween product name and price
    By CheapStairParts in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Aug 2010, 10:10 PM
  3. adjust spacing on Column Layout Grid between product name and product price
    By cpoet in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Jul 2010, 07:03 AM
  4. Product name and Price
    By Nimbuz in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 Nov 2007, 06:35 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