Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default v1.51 one-time charge added multiple times

    Hello.

    In my product info page customers can order more than one size and one colour and add these products to cart. As my website is an embroidery business I am required to add a setup charge should the customer wish to have their logo digitised, which I am able to do using attributes. My problem is that when the customer selects, for example, Size - 10, 12, & 14 in Colours - Blue, White & Black and chooses one time setup charge, within the cart the customer is charged 3 times for setup. I have added screenshots to demonstrate the problem.

    Click image for larger version. 

Name:	product_info_03.jpg 
Views:	71 
Size:	60.6 KB 
ID:	13252Click image for larger version. 

Name:	shooping_cart_03.jpg 
Views:	70 
Size:	33.7 KB 
ID:	13253

    From what I can gather there are 3 possible solutions...

    1. Add Setup Charge as a Product and direct customers to add this to cart separately
    2. Allow customers to select Logo Digitising in the Shopping Cart and price could then be added to cart
    3. When customer clicks add to cart, redirect to custom page where customer selects personalisation options, then redirects to cart.

    As I am not great with php options 2 and 3 would be beyond my capabilities. And as for option 1, it is a difficult task to ensure customers understand and follow that procedure.

    Is there an option I am missing here? Or can anyone suggest a way to implement Options 2 or 3, from previous posts in the forum? Or am I looking at this completely wrong?

  2. #2
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: v1.51 one-time charge added multiple times

    Ok, I intend to add a custom option to the product info page. For example, The customer selects whether they require Logo Digitised or Text Only. The latter is Free but if they select logo it will cost £25.00. So to test this out I created a Session id and added it to product info display...

    PHP Code:
    <?php
    session_start
    ();  
    if(isset(
    $_SESSION['setupcharge']))
        
    $_SESSION['setupcharge'] = $_SESSION['setupcharge'] = 25.00;

    echo 
    "Setup Charge = "$_SESSION['setupcharge']; 
    ?>
    I then added the following to tpl_shopping_cart_default.php around line 128...

    PHP Code:
    <?php if(isset($_SESSION['setupcharge'])) {
    $cartShowTotal += $_SESSION['setupcharge']; }
    ?>
    But instead of adding the cost of the product and the new session id it is only displaying the custom $_SESSION['setupcharge], i.e. £25.00?

    Why do they not add together?

  3. #3
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: v1.51 one-time charge added multiple times

    This one is beyond me. Unfortunately I have had to settle with an adaptation of this mod http://www.zen-cart.com/downloads.php?do=file&id=232

    It's not how I would like it to be, but for the time being it will have to do.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,703
    Plugin Contributions
    123

    Default Re: v1.51 one-time charge added multiple times

    How about using the Low Order Fee module, but charge it for all orders (and change the language string defines to "Setup Charge" or something like that)?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: v1.51 one-time charge added multiple times

    Thanks i'll give it a go now. Hopefully it is more suitable.

  6. #6
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: v1.51 one-time charge added multiple times

    The low order fee would work great if there was a way to differentiate between those orders that require setup and those that don't. With regards to the insurance mod it can be switched on or off, as per attached screenshot. The only downside is that it is just before confirm payment and not on product info page. So the chances of customers missing the setup charge before ordering is extremely high.

    Click image for larger version. 

Name:	Screen-Shot-2013-10-31-at-12.38.58_03.jpg 
Views:	49 
Size:	44.6 KB 
ID:	13273

  7. #7
    Join Date
    Mar 2014
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Default Re: v1.51 one-time charge added multiple times

    Quote Originally Posted by moesoap View Post
    The low order fee would work great if there was a way to differentiate between those orders that require setup and those that don't. With regards to the insurance mod it can be switched on or off, as per attached screenshot. The only downside is that it is just before confirm payment and not on product info page. So the chances of customers missing the setup charge before ordering is extremely high.

    Click image for larger version. 

Name:	Screen-Shot-2013-10-31-at-12.38.58_03.jpg 
Views:	49 
Size:	44.6 KB 
ID:	13273
    I think this would work great for you.

    Customize the following code in:
    /includes/modules/order_total/ot_loworderfee.php

    Install it in the Modules ... Order Totals ... and turn on:
    Low Order Fee ot_loworderfee.php

    and set it to Enable and the amount to: 10000

    Then change the code from:
    Code:
    if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true') {
    switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
    case 'national':
    if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
    case 'international':
    if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
    case 'both':
    $pass = true; break;
    default:
    $pass = false; break;
    }
    to read:
    Code:
    if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true') {
    switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
    case 'national':
    if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
    case 'international':
    if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
    case 'both':
    $pass = true; break;
    default:
    $pass = false; break;
    }

    // bof: turn ON for Option ID 1 and Option Value ID 16
    global $cart;
    $cnt_attribute = 0;
    $products = $_SESSION['cart']->get_products();
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
    if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
    foreach ($products[$i]['attributes'] as $option => $value) {
    // comment out echo when done testing
    //echo 'I see: ' . $products[$i]['id'] . ' - ' . $option . ' - ' . $value . '<br>';
    if ($option == 1 and $value == 16) {
    $cnt_attribute += 1;
    }
    }
    }
    }
    if ($cnt_attribute > 0) {
    $pass = true;
    } else {
    $pass = false;
    }

    // eof: turn ON for Option ID 1 and Option Value ID 16
    and just set the correct Option ID (currently set to 1) and Option Value ID (currently set to use 16) ... to your values ...

    NOTE: you can then change the language file with your templates and overrides ...

    I am in a similar boat. However, my set up fees are contingent upon the number of colors in the design (up to 7). If you only have a one time set up fee for $75, all you need to do is have the option on your product page. And it should work fine. Let me know if it works.

    I'm still trying to look for my tweak to encompass all my option values, but I am not proficient in PHP.

 

 

Similar Threads

  1. v150 single product (only one of) can be added to cart multiple times
    By gandalfsmith in forum Bug Reports
    Replies: 4
    Last Post: 6 Mar 2013, 11:55 PM
  2. Replies: 2
    Last Post: 16 Jan 2013, 05:07 AM
  3. One time charge
    By Tool Pusher in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 9 Feb 2010, 03:32 AM
  4. Added charge, one-time deposit/fee, minimum order
    By Pozitech in forum Managing Customers and Orders
    Replies: 2
    Last Post: 7 Nov 2006, 03:40 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