Announcement

Collapse
No announcement yet.

Mini Cart and Weight

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mini Cart and Weight

    I would like to be able to show the current total weight of my customers' basket on every page.

    The easiest way I can think of to do this would be to extend the functionality of the MiniCart plugin (more information from a previous thread) . Ofcourse I open to other suggestions, but this is just me thinking out loud.

    Within this function I am thinking its easiest to store the weight of each product and store within the cookie to then be totalled up by javascript. But firstly I need to know how to return the weight of a particular item.

    Within the code I can see;
    Code:
    my @Prices = $Self->GetCartItemPrice($pCartItem);
    I can not see a simular function to return the weight of an item within Cart.pm so I presume this function is within another class. Does anyone know the if/how I can return this value from another object?

    Please be patient with me as I do not know Perl (but come from basic programming background).

    As a point of reference, this is the current MiniCart function within Cart.pm (slightly edited from orginal);
    Code:
    sub miniCart
    {
    use HTML::Entities ();
    my $Self = shift;
    
    my $defaultCur="£";	# currency symbol to include
    
    my $cartStr="ss=" . $::g_sSearchScript . "cur=" . $defaultCur;
    my $pCartItem;
    foreach $pCartItem (@{$Self->{_CartList}})
        {
        my ($Status, $Message, $pProduct) = GetProduct($pCartItem->{'PRODUCT_REFERENCE'}, $pCartItem->{'SID'});
        if ($Status == $::FAILURE)
            {
            return ($Status, $Message, []);
            }
        elsif ($Status == $::NOTFOUND)
            {
            next;
            }
        my @Prices = $Self->GetCartItemPrice($pCartItem);
        $cartStr=$cartStr . "&!" . $pCartItem->{'QUANTITY'} . "x" . HTML::Entities::encode($pCartItem->{'PRODUCT_REFERENCE'}) . ">" . HTML::Entities::encode($pProduct->{'NAME'}) . ">" . $Prices[2]/100;
        
        }
    return $cartStr;
    }
    Thanks again for everyone's time & effort.

    #2
    This is a feature I wanted to implement but believe when I asked the question in the past the answer given was that it this cannot be done, although I would be very interested in any solutions found.
    Darren Guppy
    Golf Tee Warehouse
    Golf Tees and Golf Accessories.

    Comment


      #3
      I'm more interested in the cost rather than the weight? Who gives a crap what the weight is, i just want to know what it will cost me. What's the benefit i am missing by not showing this?

      Comment


        #4
        The reason I want to do this is;

        I have assigned a value to each product using the weight parameter (this value has nothing to do with the weight but represents the proportion of maximum order).

        I do not allow excess weight on shipping.

        Therefore customers can only place orders which do not exceed the maximum shipping weight.

        An acceptable limitation of this system; If they want to order more items they will have to place 2 orders. I am not saying this is the ideal solution, but a solution never the less.

        I welcome to any other suggestions that will achieve the same objectives.

        Comment


          #5
          You can do all that within the standard shipping settings, either by using the maximum weight parameter (on the config tab) or by setting the costs yourself according to the weight. If you only send out packages of 20kg or less for example, then your shipping matrix for 40kg is just setup to be double what you charge for 20Kg and send it out as two packages. If you make this area confusing you will suffer greatly usually, so keep it simple and explain this on a delivery details page if necessary. A third option is to set what happens when delivery reaches an excess amount, again set in shipping settings.

          Comment


            #6
            My service consists of the compilation digital data on to DVDs. The weight is referring to the size of the files (my products) and therefore can not exceed the DVD's capacity.

            So the reason I was hoping to show the current running weight within the mini basket was then to translate this into % of the DVD used.

            Comment


              #7
              You could set weight according to file size and set your shipping matrix to allow for the 4GB or whatever it is you allow, you then set the excess rules to not allow an excess of data (weight) per order. You could alter the excess message to be more in line with what your situation is, ie "too much data Bob, that much won't fit on a single disk".

              Comment


                #8
                I have already done all of this.

                So going back to my original question. Is it possible to modify the MiniCart or shopping basket to show the 'total weight' or in my case the 'total data' in the customers' basket?

                Comment


                  #9
                  I have done this recently. I extended ActinicOrder.pm so that the weight was added to the Cart Cookie. Then it's easily displayed in the Cart Summary. Significant patching was required. Email for a quote.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Help and Advice...? It's nice to be nice!

                    Originally posted by leehack View Post
                    I'm more interested in the cost rather than the weight? Who gives a crap what the weight is, i just want to know what it will cost me. What's the benefit i am missing by not showing this?
                    Actually, there is a reason why people might want this and given that someone asked the question politely, it warrants a more serious consideration than that.

                    I would like to implement this and I do think others would too.

                    I have many customers who try to take their parcels to the maximum weight allowance (getting their money's worth for the shipping cost).

                    They get very frustrated when they want to get as close as they can to 30 kilos without exceeding it and paying for another parcel... but can't get it right and have to add and remove products or jiggle quantities in the cart.

                    On some items its obvious, but there are products where the net and gross weights are very different. If a customer has 10-15 product lines in their cart with various quantities, they can't keep track and they DO NOT want to mess about with a calculator. They might call in instead and waste some time or worst of all, they might give up and sod off.

                    So this IS a real world requirement which is missing, along with others that I have mentioned in the wish lists previously. Can't be bothered to ask for anything anymore though... I've been reading though posts with same requests for features that I want that are from years ago :-(

                    Comment

                    Working...
                    X