Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Lynnwood, WA, USA
    Posts
    40
    Plugin Contributions
    0

    Default shopping cart display

    I am trying to add the products weight and free shipping(if is free shipping) to shopping cart page. In the box beneath the products name and price and before the attributes listings. I am using zencart 1.51.
    I need help with how to get the weight and if free shipping to show properly in the shopping cart page, tpl_shopping_cart_deafult file. I either get everything listed as free shipping or nothing listed as free shipping. I also have not been able to get the weight to appear at all. I have tried adding coding to modules page header which did not seem to help. Any suggestions of what to try next would be greatly appreciated.
    What I am trying to get is the product name, cost, weight and free shipping then the attributes broken down with cost and weight to show under each product.
    Sample of what I am trying to achieve:

    Doctor Decorative Throw
    [click to edit]

    Decorative Throw - $51.99
    [Free Shipping] - [ lbs.]
    Additional Matching Items
    •Tote Bag - [$35.00][2 lbs.]
    Throw Personalization
    •Dr. Lana Smith - [$0.00][0 lbs.]
    Tote Bag Personalization
    •Dr. Lana Smith - [$0.00][0 lbs.]

    Grapes Stained Glass Panel
    Grapes Stained Glass Panel - $102.95
    [Free Shipping] - [ lbs.]

    The 2nd item is not free shipping.
    I also have not taken the time to work on getting the Calulated Charges for the text to work yet.
    Please help with suggestions on how to proceed.
    Thanks

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

    Default Re: shopping cart display

    On the product_info Attributes already will show if there is weight on them ...

    What are you trying to do that is different from how it already works by default?
    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 2009
    Location
    Lynnwood, WA, USA
    Posts
    40
    Plugin Contributions
    0

    Default Re: shopping cart display

    I am adding the base weight and price of the item. The attributes weight and price(except for the text price total) I programmed to show for each attribute. I am having trouble with getting the products weight to show.

  4. #4
    Join Date
    Jun 2009
    Location
    Lynnwood, WA, USA
    Posts
    40
    Plugin Contributions
    0

    Default Re: shopping cart display

    Re: shopping cart display
    On the product_info Attributes already will show if there is weight on them ...

    What are you trying to do that is different from how it already works by default?

    I did not catch that you said product info page. I am trying to edit the shopping cart page in the cart box with a breakdown of the item(s) they are purchasing. The item, price,weight,free shipping if applicable,attributes and their price & weight.

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

    Default Re: shopping cart display

    You could customize the files:
    /includes/modules/pages/shopping_cart/header_php.php
    Code:
          $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.attributes_discounted, pa.products_attributes_id, pa.products_attributes_weight_prefix, pa.products_attributes_weight
    Code:
    // bof: show attribute price in cart
          if ($attributes_values->fields['attributes_discounted'] == 1) {
            // apply product discount to attributes if discount is on
            //              $new_attributes_price = $products_options->fields['options_values_price'];
            $new_attributes_price = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, '', 'false');
            $new_attributes_price = zen_get_discount_calc((int)$products[$i]['id'], true, $new_attributes_price);
          } else {
            // discount is off do not apply
            $new_attributes_price = $attributes_values->fields['options_values_price'];
          }
          $attrArray[$option]['new_attributes_price'] = $new_attributes_price;
          $attrArray[$option]['products_attributes_weight_prefix'] = $attributes_values->fields['products_attributes_weight_prefix'];
          $attrArray[$option]['products_attributes_weight'] = $attributes_values->fields['products_attributes_weight'];
    // eof: show attribute price in cart
    /includes/templates/your_templates_dir/templates/tpl_shopping_cart_default.php

    with:
    Code:
    <!-- ORIGINAL <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li> -->
    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']) . ' [ ' . $value['price_prefix'] . $currencies->format($value['options_values_price']) . ' ] ' . $currencies->format($value['new_attributes_price'])  . ($value['products_attributes_weight'] > 0 ? ' [ ' . $value['products_attributes_weight_prefix'] . $value['products_attributes_weight'] . 'lbs ] ' : ''); ?></li>
    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!

  6. #6
    Join Date
    Jun 2009
    Location
    Lynnwood, WA, USA
    Posts
    40
    Plugin Contributions
    0

    Default Re: shopping cart display

    I already have those values(except for the combined text charge-calculated letters charges). I am looking for the product (not attribute) weight and if item is listed as free shipping.

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

    Default Re: shopping cart display

    A quick way to get something from the tables:
    products
    produces_description

    is to use the function zen_products_lookup ...

    On the shopping_cart template, you could use:
    zen_products_lookup($product['id'], 'products_weight')

    to obtain the Product weight without the Attribute weight includes ...
    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!

 

 

Similar Threads

  1. No Shopping Cart display?
    By SpeedRacer in forum Upgrading from 1.3.x to 1.3.9
    Replies: 8
    Last Post: 1 Mar 2011, 03:05 AM
  2. /*Shopping Cart Display*/
    By broeder in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Apr 2009, 04:16 PM
  3. Shopping Cart wont display after adding product to cart
    By fmf_tactical in forum General Questions
    Replies: 2
    Last Post: 6 Mar 2009, 03:43 AM
  4. Replies: 2
    Last Post: 3 Apr 2008, 01:21 AM

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