Giter Club home page Giter Club logo

shop-for-processwire's Introduction

  1. Install Shopping Cart
  2. Add sc_price class to your product template (can be multiple templates)
  3. Edit few of your products and give them price
  4. Add get("ShoppingCart")->renderAddToCart(); ?> to your product template. If you don't like the markup it generates, you can put the wanted markup directly into template.
  5. At this point you can add products to your cart. If you want to show somewhere how many products there is in your cart, do this in your template: $modules->get('ShoppingCart')->getNumberOfItems(false); // Total number of items or $modules->get('ShoppingCart')->getNumberOfItems(); // Different items only, ie. qty doesn't matter
  6. How about the actual cart page, where you can see all the products in your cart? Add this to any of your templates where you want to see it:
get("ShoppingCart")->renderCart() ?>

This is starting to take shape. But there is no checkout at all? How to actually order something? 7. Install Shopping Checkout module 8. Now you see "Continue to checkout" under your renderCart() output. Clicking that would result in page not found error. Shopping Checkout module creates system template called sc-checkout. You need to create corresponding template file. So create sc-checkout.php to your /site/templates/ folder. Only code you need to put there is:

get("ShoppingCheckout")->renderCheckout(); ?>
  1. If you need to customize the fields etc, you can do that in certain degree by editing the ShoppingCheckout module. Also, pw-shop is fully multilang, so you probably do want to translate the module files.
  2. Checkout doesn't let you go through unless you install at least one payment method. So do so if you want to continue.
  3. You might want to show checkout steps (kind of a breadcrumb). That is possible with yet another module. Just put this to your sc-checkout template:
get("ShoppingStepsMarkup")->render(); ?>
  1. When someone orders something, you probably want to see those in your admin. That is what Shopping Orders Management module is for. Go ahead and install that also (it has basic functionality, but very much wip).

shop-for-processwire's People

Contributors

apeisa avatar arjenblokzijl avatar somatonic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.