Thread: Need some help!

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1

    Default Need some help!

    Hi everyone, I have a cart www.kitchenwarehouseltd.com

    Many people send orders or ask for quotes via email. To quote we normally just create a shopping cart on the website as its fast and simple. What is then needed is a way to send this cart to the customer. In an ideal work this would simply be a "share this cart" button which when emailed would open up the same cart with the customer. Im not sure if this is possible.

    We mainly use paypal for payments so I was wondering if there was a way to send the customer the cart through paypal, like an invoice.

    Im sorry if that's hard to understand, In simple terms I want to be able to send a customer a link to the cart/payment.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Need some help!

    If these customers have created an account you could use the plugin login as customer from admin and create the order

    http://www.zen-cart.com/downloads.php?do=file&id=583

    Alternatives are these in combination
    http://www.zen-cart.com/downloads.php?do=file&id=1501
    http://www.zen-cart.com/downloads.php?do=file&id=1500
    http://www.zen-cart.com/downloads.php?do=file&id=1513
    Zen-Venom Get Bitten

  3. #3

    Default Re: Need some help!

    I have thought about doing it this way,

    create account through admin > create order > send client username and password

    But this becomes more and more complicated for the client, Honestly I don't think there is any other way. But I still hopeful!

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Need some help!

    You could get someone to code a 'share this cart' button for you. It is not a huge thing to do. Issues you'd want to think about before doing that are how you'd want to deal with items that gone out of stock or have changed price.

    The issue with doing it as an order as has been suggested is that it takes the item out of stock. So, if these are really just quotations then you probably do not want to do that.

    So here's a start to what you want.

    Add this to includes/templates/YOURTEMPLATE/templates/tpl shopping_cart_default.php just before the closing </body> tag.

    Code:
    <?php
    if($_SESSION['customer_id']==123456)
    {
    echo '<div style="width:400px;word-wrap: break-word;overflow: hidden;">';
    echo HTTP_SERVER.DIR_WS_CATALOG."?savedCart=".urlencode(serialize($_SESSION['cart']));
    echo '</div>';
    }
    ?>
    Change the 123456 to match an account number that you can use. (Set up a customer that is you and use that number) What that will do is print out on the screen a very long url at the bottom of the shopping cart page just for that customer account.

    Then put this block of code at the bottom of includes/application_top.php

    Code:
    if($_GET['savedCart'])
    {
    $_SESSION['cart'] = unserialize(urldecode($_GET['savedCart']));
    }
    Yes, guys, I know there are better ways of doing this. best of all is probably as an init_include so if you know how to do that put in in one of those instead :-) And if someone wants to formalise this then that is how it should be done :-)

    Then if you copy and paste that very long URL it will reproduce the shopping cart when someone goes to it. Note that there is no handling of price changes or out of stock stuff.

    Obviously back everything up and if possible give it a roll on a development site first. But it works fine for me. You'll probably want to use a url shortener like http://goo.gl/

  5. #5

    Default Re: Need some help!

    This sounds perfect really, We do not really keep track of stock so that is fine. Also I was just wondering if this would handle attributes okay?

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Need some help!

    Quote Originally Posted by niccol View Post
    Add this to includes/templates/YOURTEMPLATE/templates/tpl shopping_cart_default.php just before the closing </body> tag.
    that should read the closing </div> tag

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Need some help!

    Yes, attributes fine. It is effectively copying and pasting the session variable array that contains all the cart information.

    I scribbled this in a coffee break so give it a good test and see how it works for you. It is two very small code changes so should not be an issue if you do not like it. No-one should see any changes except you so testing is not a problem.

  8. #8

    Default Re: Need some help!

    Just tested this and its perfect! There are a couple of changes that I would love. Mainly having the link shorter but also, could it take the user to the shopping cart first instead of the main page?

    Thanks for that, your amazing

  9. #9
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Need some help!

    Ha ha! Copying and pasting into a URL shortener is just too much work ? :-) Actually if I had time/inclination I'd build it in but the coffee break is over so ...

    For the other bit use this instead:

    Code:
    <?php
    if($_SESSION['customer_id']==1)
    {
    echo '<div style="width:400px;word-wrap: break-word;overflow: hidden;">';
    echo zen_href_link(FILENAME_SHOPPING_CART, "savedCart=".urlencode(serialize($_SESSION['cart'])));
    //echo HTTP_SERVER.DIR_WS_CATALOG."?savedCart=".urlencode(serialize($_SESSION['cart']));
    echo '</div>';
    }
    ?>

  10. #10

    Default Re: Need some help!

    Thanks for the updated code niccol :)

    The reason for not wanting the URL shortener is that basically the two managers who will be using this method are not very computer literate shall we say. So I really want to make it as simple as, make a cart and copy the link.

    Also I would love to donate a little for your help!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. HELP! I ready need help with some modifications
    By missinglife in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 3 Oct 2009, 08:02 PM
  2. Need some help
    By tim2255 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 31 Oct 2008, 04:26 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