npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquerylistadecompras

v4.0.59

Published

The Lista de Compras platform jQuery plugin

Downloads

351

Readme

jQuery.ListaDeCompras

jQuery plugin of the Lista de Compras platform

Build status wakatime GitHub license GitHub last commit Maintainability Test Coverage CodeFactor

jquery.ListaDeCompras logo

NPM - Node Package Manager

npm npm

Este repositório está disponível no NPM com o nome jquerylistadecompras.


npm i jquerylistadecompras

NuGet - Package Manager for .NET

jquery.listadecompras NuGet Version jquery.listadecompras NuGet Downloads


dotnet add package jquery.listadecompras

Github All Releases

Lista de Compras (Editora Inovação) is a application that allows you create a list of available products selling in Vitrine do Artesanto or Tania Silva store and show it on any website with a link to the cart of the store.

With this plugin you can manage your lists, [TODO] account preferences and get the available products for building new lists.

Lista de Compras platform

Lista de Compras API documentation

Lista de Compras .NET SDK

The plugin working on Programa Arte Brasil:

Lista de Compras no Programa Arte Brasil

And in the Canal do Artesanato:

Lista de Compras no Canal do Artesanato


Usage

To simple show a list in your page, creates a simple HTML element and call the plugin:

<div id="showListaDeCompras"></div>

Now call the plugin:

var listaDeCompras = $("#showListaDeCompras").listaDeCompras({
  readKey: "your-read-key",
  listId: 1, //The list ID
  theme: "oliveDrab", //The list theme (availables: red, orange, green, blue, oliveDrab and default)
});

Options

You can pass options by the constructor or by the options method (see _ Methods _ above for more info)

| Option | Description | Default value | Values | | :-------------------------: | :-------------------------------------------------------------------------------------: | :--------------------------: | :------------------------------------------------------: | | useProduction | Sets the platform environment | true | boolean:true|false | | readKey | The platform API key | null | string:your api key | | type | The display type (use table or ul/li elements) | table | string:table|list | | showPrices | Flag to show products prices or not | true | boolean:true|false | | listLoadSuccesfullyCallback | A callback function to trigger when the lists load succesfully | null | function | | listLoadErrorCallback | A callback function to trigger when cannot load the list (error | list dosen't exists) | null | function | | debug | A flag to enable or disable debugging | false | boolean:true|false | | maxProducts | Limit the maximum number of products displayed in the list | -1 | integer: -1 show all | N shows N | | theme | The plugin CSS theme | default | string: red, orange, blue, green, oliveDrab, default | | customCampaign | The utm_campaign string for the buy link | null | string | | headerText | The plugin header text | null | string | | css | This option allows you set custom CSS classes for some items of the plugin | ** default plugin classes ** | object: see table below |

** The CSS classes ** can be overrrinding by setting the CSS option with the following object:

| Property | Description | Default value | | :------------------: | :-------------------------------------------------------------------------: | :--------------: | | itemQuantity | The item quantity field | quantity | | itemQuantityPlus | The item quantity increase button | plus | | itemQuantityLess | The item quantity decrease button | less | | itemAvailability | The item availability class to enable|disable the quantity field & buttons | availability | | itemAvailabilityIcon | The item availability icon | stockIcon | | buyButton | The buy button | buy | | cartTotal | The cart total descriptor | amount |


Methods

There are a few methods that can be called to operate the plugin programmatically

init: Initializes the plugin

$("#target").listaDeCompras("init");

destroy: Destroys the plugin (the list itself is also removed from the page)

$("#target").listaDeCompras("destroy");

load: Loads a specific list by it's id

$("#target").listaDeCompras("load", 1234); //try to load the list 1234

updateQuantity: Updates the selected quantity for a specified SKU in the list

$("#target").listaDeCompras("updateQuantity", 1, 10); //updates the quantity of SKU 1 to 10 units

addToCart: adds a sku to the cart, this is the same of adding 1 item of the product

$("#target").listaDeCompras(
  "addToCart",
  new { SalesChannelId: 1000001, Stock: 10, Quantity: 1, Price: 10.9 }(),
); //You should pass the sales channel id, available quantity, desired quantity and the price of the SKU

clearCart: Removes all products from the cart

$("#target").listaDeCompras("clearCart");

addEventListeners: Add event listeners to the plugin increase & decrease buttons, quantity fields and buy button

$("#target").listaDeCompras("addEventListeners");

getBuyLink: Gets the link to the store cart (with all sku & quantity) selecteds and the SEO params

var link = $("#target").listaDeCompras("getBuyLink");
window.open(link);

getCartTotal: Gets the current cart total

var total = $("#target").listaDeCompras("getCartTotal");
window.alert("Current cart is R$ " + total);

updateCartTotal: Updates the cart total (only if showPrices option is set to true), usefull when you add products or change the quantity of a product via JS

$("#target").listaDeCompras("updateCartTotal");

set: Sets an option after the plugin has been initialized

$("#target").listaDeCompras("set", "optionName", "optionValue");

get: Gets the current value for a option

$("#target").listaDeCompras("get", "optionName");

debug: Debugs the current plugin to the console.log

$("#target").listaDeCompras("debug");

Developed by Guilherme Branco Stracini for Editora Inovação

© 2016 ~ 2018 All rights reserved.