Author Topic: Customize cart  (Read 2491 times)

Offline CGilliland

  • Newbie
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Customize cart
« on: November 18, 2020, 11:19:18 PM »
I have set up my pages to embed products and the AbanteCart shopping cart.  I would like to customize the cart but I can't figure out how.
Explanation:
It's an e-commerce site where the customer can select from a predefined list of images to build word art.  When they click on "Add to cart", the product should be added as "one quantity" with a list or preview (preferably) of all the options they selected.  (i.e. if the customer entered "Poof" on the customization page, the cart should show "Qty 1 - 4 image frame" with either a list of the images they selected, or better yet, a small preview of the actual images.  I think I know how to get the "4 image frame" part, it's the preview I can't figure out.
The staging website is : https:BACKSLASHBACKSLASHletter-photographyDOTcom
Please keep in mind that YES, I know I have to fix my styling -- just making sure I can do all the cart functions first.
When you enter letters for testing, please use the "Alphabet Photography with Custom Frame" box, only use 2 letters and only A, B, and/or C. 
(Again, making sure I can do all cart functions before I run all that code.)

Thanks

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Customize cart
« Reply #1 on: November 19, 2020, 04:30:01 AM »
if i understood correctly, you should to create one product with options set (All letters of alphabet).
You can make it as checkboxes
Plus one more option for frame for that chosen letters.
Right?

I don't see any problems here except UI.

1. You should to create all that options for the product.
2. Add word typing (as i see you already have it)
3. After button click you should modify product page to show preview and make all checkboxes of product options as hidden inputs. Every "input" must be part of product form and contains a letter as a "value".
You can modify all of them by
Code: [Select]
javascript $(document).ready(function(){  your code here  });
Then customer just adds all that set into the cart.
Try to make with plain checkout first, not via "fast-checkout".
If it works - you can move you solution into fast-cheskout extension.

hope this help
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline CGilliland

  • Newbie
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Re: Customize cart
« Reply #2 on: November 20, 2020, 10:16:12 PM »
I got closer, but still no dice.
If you see the attached picture.. I have added images to options.  But in the cart, it only shows the image for the first option. I need to show images for all options.  In this picture, there are only two -- but there may be up to and including 11.

Any advice?

Thanks!

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Customize cart
« Reply #3 on: November 26, 2020, 11:36:32 AM »
you should to process adding to cart.
Just create hook onControllerPagesCheckoutCart_initData(){}

and modify your chosen letters into option set (see request POST data).
Just compare post data of generic product and yours.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod