Results 1 to 6 of 6
  1. #1

    Default Swap contents of cart for chosen category.

    Hi Guys,

    Just a quick question. I have multiple categories set up in which there are many products with the same name. So, for example, category id 1 has product "Toy1" and category id 2 has product "Toy1" also. These are completely separate products with a different look and price.

    However I would like something that I can swap the entirety of the contents of my cart to another category, So I could choose category id 2, and it would swap the "Toy1" in my cart to the "Toy1" that is in category id 2 hence updating my basket total and the contents.

    In essence, This would check the contents of my cart and the category chosen, If a product with the same name exists it will swap them.

    I know this is a really strange way of having things set up. Any ideas?

    I can imagine this as a separate page, a dropdown selector for the category and then a go button, But I have no idea for the code behind the button to swap things!

    Thanks,
    Dan

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,183
    Plugin Contributions
    11

    Default Re: Swap contents of cart for chosen category.

    I know this is a really strange way of having things set up.
    One can just imagine the problems down the road with something like this.

    Are you envisioning only you are altering carts? The customer? How does the customer know of the proper category? Lots of ??????

    Attachment 19287

  3. #3

    Default Re: Swap contents of cart for chosen category.

    Sorry yes, Should make it a little more clear, This is only designed to be a staff tool as we use the website to quote for customers. The main issue I can think of is if there is no matching product, In this instance, I think simply not swapping would work for us (Even better if it can throw up a message with a list of products not swapped)

    To give you an idea of two different categories in our store, with multiple products all with the same name in different categories
    https://kitchenwarehouseltd.com/comp...rs/ivory-units
    https://kitchenwarehouseltd.com/comp...ght-grey-units

    These products both have the same products and same names between each, The idea is for a staff member to be able to quote faster in one "Colour" we could add everything to the basket and then simply use the tool to swap to another category. Hope this makes sense as I do understand its a very strange request.

    I have managed to fumble my way through doing quite a bit of custom work but never managed to full learn PHP. This is my biggest task so far and in laymen's terms I think I need to do something as follows

    - Make extra page to allow what I am calling "range change"
    - Have a dropdown selector that lists all categories under master id "1" (the only ones I want to be allowed selected)
    - Make a loop that checks the current cart product names against the category chosen in the dropdown product names
    - Any that are found to match delete the product from the basket and add the new product id to the cart
    - (Bonus) Make a message to alert of any products that were not swapped

    I was thinking another way this could be done was if I give each product a unique identifier that would match through categories, but as the whole website was built upon the same structure the names already match exactly so this should work perfectly as the identifier.

    Any pointers or directions you can give me for the above would help me tremendously as I am simply going to start hacking some stuff together to see how far I can get

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,183
    Plugin Contributions
    11

    Default Re: Swap contents of cart for chosen category.

    Since your folks are the ones accessing, make it easy on them. Let's take the basic premise based on the two links.

    First, I'm gonna make one product -- Acrylic Kitchen Units

    It's first Option Name is Color with Option Values of Light Grey Gloss, and Ivory (Normally, I would add Please Select to force the customer to make a choice but, your employees would not need that.

    Next is Option Name is Highline Base Units with No Thanks, and the names of the units as the Option Values. No Thanks would be set as default display

    Next is Option Name is Drawerlined Base Units with No Thanks, and the names of the units as the Option Values. Again, No Thanks would be set as default display.

    The same for 2 Drawer Base Units. 3 Drawer Base Units, 4 Drawer Base Units, 5 Drawer Base Units, Corner Base Units, Standard Wall Units,.... You get the idea.

    Now, a customer callls and wants Acrylic Kitchen Units. Your person goes to one page and says, "What Color?"

    Next question is, "Any Highline Base Units?" Although you won't be able to give a total without a commercial mod, you can tell the customer, "Those two, 300 Base Units would be 106.50 GBP each."

    This could progress down the list until they are through with that color.

    A short scenario but, hopefully, you can get the gist of the idea. A very simplified version can be seen at https://allpecans.com/index.php?main...roducts_id=135. Notice the Price Breakdown sidebox. Combined with the mentioned commercial mod, it can keep a running total for the employee.

  5. #5

    Default Re: Swap contents of cart for chosen category.

    The customers also use the website to order like an ordinary website. So it needs to be super easy to use for customers as well as I'm hoping to provide this extra functionality for staff. The staff uses the website to quote as I have a modification that allows the staff to send a link in which then opens the contents of the quotation into the customer's basket when clicked.

    When I first set up the store I was trying to figure a way out how to do the pages without making hundreds of products, However, with attributes I only ever got so far, As with the product the store sells (Full kitchens) In each group "Highline base units" "Drawer Units" customers would need to choose multiple of each product, for example, they may want 2 x 300 Base Units and 1 x 400 Base Unit, Then multiple from the next group. So the best way I could eventually come up with was the product list grid system. I was close with another attribute grid list addon that I have in use on some other pages:
    https://kitchenwarehouseltd.com/repl...olours/glacier

    But for the customers, we needed something that could display all the products, on one page, with the images and the ability to add them to the cart all at once. I could set this up as a separate site using your method above and quote this way. However, I would not then be able to use the same functionality with the quoting link system. (attached an image of a quote generated by the website)
    Name:  quote.jpg
Views: 27
Size:  36.4 KB

    Thanks for your suggestion though I feel like either way I would take it I would need some custom code in regards to getting the attributes to look how my boss would like them or the custom code for the original "swap" functionality

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,183
    Plugin Contributions
    11

    Default Re: Swap contents of cart for chosen category.

    Yep, gonna take some major doing.

    A word of caution, though. Either get someone to set it up for you or create your own cart as a previous Zenner did.

    Don't be lured into WordPress, Magento, etc. just because someone says they have a mod that will do this. WordPress, alone, had 700,000 breaches in September. Most of those were through a mod that was added to the site.

 

 

Similar Threads

  1. v139h Donate for cart contents?
    By Zariera in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 12 Jan 2012, 05:32 PM
  2. Changing font size for shopping cart contents
    By oce328 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Feb 2009, 10:06 PM
  3. Why do my cart contents still exist for next visitor?
    By TRAIFF in forum Managing Customers and Orders
    Replies: 1
    Last Post: 4 Nov 2008, 06:51 AM
  4. Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)
    By CelticKatt in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 3 Apr 2008, 10:22 PM
  5. Chosen attribute wrongly displayed in Shoping Cart Contents
    By mikajlo in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Apr 2007, 01:53 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