All Projects → RowlandOti → CartCounter

RowlandOti / CartCounter

Licence: Apache-2.0 License
🛒 Add a cart icon with item counter to the Toolbar. You can increment the counter based on the number of unique items the user has in the shopping cart.

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to CartCounter

ng-shopping-cart
🛒 An Angular component library to create shopping carts
Stars: ✭ 46 (+53.33%)
Mutual labels:  shopping-cart, shopping-cart-solution, cart-items
Laracom
Laravel FREE E-Commerce Software
Stars: ✭ 1,570 (+5133.33%)
Mutual labels:  shopping-cart, shopping-cart-solution
react-use-cart
React hook library for managing cart state
Stars: ✭ 297 (+890%)
Mutual labels:  shopping-cart, cart-items
ShoppingCart
简单的购物车 for iOS written by Objective-C
Stars: ✭ 14 (-53.33%)
Mutual labels:  shopping-cart
CodeIgniter3-online-shop
A full e-commerce project built with CI3 HMVC with Email confirmation,Paypal payement , Ion Auth , Live Chatroom and full admin dashboard
Stars: ✭ 114 (+280%)
Mutual labels:  shopping-cart
svelte-commerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, Typescript, Open Source, MIT license. 1 command deploy to your own server, 1 click deploy to netlify.
Stars: ✭ 695 (+2216.67%)
Mutual labels:  shopping-cart
e-commerce-microservices
REST Microservices architecture for E-commerce with Spring boot, Cloud and multiple modules
Stars: ✭ 102 (+240%)
Mutual labels:  shopping-cart
magento2-freeshipping-progress-bar
Add a free shipping eligibility progress bar to your Magento 2 websites cart to promote increased order value.
Stars: ✭ 37 (+23.33%)
Mutual labels:  shopping-cart
Node.js-Stripe-Shopping-Cart
Example integration of Stripe's Checkout API into a Node.js application
Stars: ✭ 93 (+210%)
Mutual labels:  shopping-cart
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+353.33%)
Mutual labels:  shopping-cart
hubble-frontend-pwa
E-Commerce PWA Frontend
Stars: ✭ 43 (+43.33%)
Mutual labels:  shopping-cart
woo-cart-expiration
Set a time limit on a customer checking out.
Stars: ✭ 19 (-36.67%)
Mutual labels:  shopping-cart
shopnx
Ready to use AngularJS Shopping Cart with all features
Stars: ✭ 71 (+136.67%)
Mutual labels:  shopping-cart
nodejs-shopping-cart
NodeJS / Express / MongoDB - Shopping Cart (monolithic app with handlebars)
Stars: ✭ 42 (+40%)
Mutual labels:  shopping-cart
MarketServer
基于Springboot + Mybatis框架实现的一个简易的商场购物系统后端。该有的基础功能它都有!
Stars: ✭ 26 (-13.33%)
Mutual labels:  shopping-cart
grav-skeleton-gravcart
The Grav Shopping Cart skeleton
Stars: ✭ 11 (-63.33%)
Mutual labels:  shopping-cart
Shopping-Cart
A simple E-commerce website using Flask
Stars: ✭ 147 (+390%)
Mutual labels:  shopping-cart
Cake-Shop
A sample Cake Shop Website built with ASP.NET Core (Multi-Page Application)
Stars: ✭ 44 (+46.67%)
Mutual labels:  shopping-cart
eCommerce-Website
php project: Display several pages of product detail and create shopping cart, implement CRUD operation, checkout in the end
Stars: ✭ 23 (-23.33%)
Mutual labels:  shopping-cart
ShoppingCartAnimation
Shopping bag animation with zoom and Bezier curves
Stars: ✭ 29 (-3.33%)
Mutual labels:  shopping-cart

Status

Build Status Download contributions welcomeMethods & SizeAndroid Arsenal

CartCounter

Add a cart icon with item counter to the Toolbar. You can increment the counter based on the number of unique items the user has in the shopping cart. In addition, you can animate the icon when there is an increment or decrement.

  • Customize the cart icon and icon color
  • Animate the cart icon on changing value

Download

Grab the latest version via Maven:

<dependency>
  <groupId>com.rowland.cartcounter</groupId>
  <artifactId>CartCounter</artifactId>
  <version>1.0.0-beta-2</version>
  <type>pom</type>
</dependency>

or Gradle:

repositories {
  jcenter()
}

dependencies {
  compile 'com.rowland.cartcounter:CartCounter:1.0.0-beta-2'
}

Usage

Usage is very simple and easy to incorporate. You can use it like below

res/menu/menu_main.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <item
        android:id="@+id/action_addcart"
        android:icon="@drawable/ic_shopping_cart_white_48dp"
        android:title="Add Cart"
        app:actionLayout="@layout/menu_cartcount"
        app:showAsAction="always"></item>

</menu>

Thereafter you can load your Menu and associate it with the CartCounterActionView in code like below

override fun onCreateOptionsMenu(menu: Menu): Boolean {
        menuInflater.inflate(R.menu.menu_main, menu)
        return super.onCreateOptionsMenu(menu)
    }

override fun onPrepareOptionsMenu(menu: Menu): Boolean {
    val itemData = menu.findItem(R.id.action_addcart)
    val actionView = itemData.actionView as CartCounterActionView
    actionView.setItemData(menu, itemData)
    actionView.setCount(cartCount)
    return super.onPrepareOptionsMenu(menu)
}

If you would like to override the background color of the count TextView, you can do so in your styles include the cc_tv_background_color attribute. For example:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="cc_tv_background_color">@color/colorAccent</item>
    <item name="cc_is_animate_layout">true</item>
</style>

Preview

Alt text

Developers

 Otieno Rowland

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].