Jump to content

Search the Community

Showing results for tags 'cart'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hello everyone, I just made a website and created the cms using Processwire. It was really great to set up and I can configure it just the way I want it which is perfect. Now this site has 1 main product to sell in 4 colors. My question now is, how do I create a checkout for the visitors with easy payment such as Paypal and iDeal (I live in holland). I'm not to familiair with PHP to create a whole checkout form which is save enough and with a data system for all the customers myself. So I thought I would only use the shopping cart and catalog function of Prestashop. But how exactly can I set that up? I was thinking about permalinks. So that customers on my site can select the product and how many they want and after that they get linked right to the checkout page from Prestashop with the exact price and that they only have to fill in their info. Do you guys have suggestions on this? Kind regards, Joris
  2. Hey guys, I struggled about half a week, okay wasn´t the only thing I´m on..but I´m not getting it. I´m working on a little page with a little shop, just a few books. Of course I know Apeisas shop, but it doesn´t support tax out of the box right now and I want to have the whole shop with cart and checkout on a single page and I had half of it already working with jquery but wanted to have something more scalable. While trying to get it on my own I´m digging more into php and PW Blabla I have a template called order. My plan is to store the cart in order page like "Cart 12.5.2014" and name it to "Order 12.5.2014" when checkout is completed. The choosen cart items are stored in a repeater "order_items" with fields "order_qty" and "order_product" (page fieldtype) Everything works fine. First time the customer is adding an item to the cart the system will create the page and add the product to the repeater. I´m storing an individual id in the session which will be the name (path) of the page so I can check if one is already existing and just add more items to it. Once the customer is ready and fills out the order form, the page gets updated his name and stores the address information and the id in the session gets deleted so the order is kind of locked. The only problem is, I´m not able to update the item list properly. Either each time the customer adds item 1 to the cart it creates a new repeater or it changes only the qty of the first and only repeater even when he adds another item to the cart Because I´m not a 100% sure what I´m doing it´s more like trial and error. This is my last working code where it´s updating the same repeater item every time if($input->post->addtocart) { $sid = $session->sid; $order = $pages->get("name=$sid"); $order_items = $pages->get("name=$sid")->order_items; if(!$sid) { $order = new Page(); $order->parent = $pages->get("/bestellung/"); $order->template = 'order'; $order->title = 'Warenkorb '.date("d.m.Y - G:i:s"); $session->set('sid', str_shuffle(session_id())); //str_shuffle to prevent problems when customer finishes an order and want to make another order $order->name = $session->sid; $order->save; } if(count($order_items)) { foreach($order_items as $items) { if($items->order_product = $form_addtocart[item]) { $items->of(false); $items->order_qty += $form_addtocart[qty]; $items->save(); break; } } } else { $order->of(false); $order_items = $order->order_items->getNew(); $order_items->order_qty = $form_addtocart[qty]; $order_items->order_product = $form_addtocart[item]; $order_items->save(); $order->save(); } } // end addtocart On the one hand, I´m understanding what happens. On the other I have no idea what´s going on. Maybe there are a lot of improvement possibilities on my code haha. Uh, I thought about customizing the events fieldtype to store the items, but I thought repeaters are easier for the beginning. Maybe tailored events field will be the next version of the shop. I really hope there is an easy solution for this "little" thing. Maybe I missed the right search terms. Cheers and a nice evening to all EDIT: Forgot to mention, that I know, that the "if(count($order_items))" is not a good way, because once there is an item in the cart it´s true And I already tried in_array() and array_search() but couldn´t get it working :-/
×
×
  • Create New...