Skip to main content

News

API and frontend release news for developers building on Shoptet.

Categories: API news · Frontend news

Subscribe: RSS · Atom · JSON

How to properly remove a product from the cart with JavaScript

· One min read
Pavel Husa

In the past, we introduced the JS function addToCart that can be used to add various items to the cart see a post here.
As a complementary function we added function to remove an item from the cart available in Shoptet structure: shoptet.cartShared.removeFromCart. This function accepts one parameter itemId formed as an object. This ID can be found in a cart form as hidden input element.

Product changes – “from” validation

· One min read
Pavel Husa

All /changes endpoints provide information about recent changes to data to signalize which entities might need to be re-processed. Although some modification times are far in the past, we guarantee only 30 days of history to be available complete. The information further in the past is most probably incomplete. Despite of this fact we have seen many API users doing calls with ?from= parameter much older then 30 days, which cause performance issues and provide only partial results. As a consequence we decided to validate the ?from= parameter in the Recent product changes and if older than 32 days, the request is declined (with 400 status code).

Add and modify filtering parameters

· One min read
Pavel Husa

We have extended endpoints Insert product and Modify product to support also filtering parameters – see description of the request body objects in the documentation, right-most pane, section Request » Attributes. The filtering parameters and their values must already exist in the eshop, they are not created automatically.

Recycling fee in Order detail

· One min read
Pavel Husa

Endpoint Order detail was extended to contain recycling fee (contribution). Items category and fee (amount) are available for each item, where applicable. The fee is always specified per order item and is already multiplied by item amount and eventually converted to the order currency, if different.

Add or modify meassurement units in product detail

· One min read
Pavel Husa

We have extended Product insert and Product update to support also meassurement units. This means, when adding a new product or changing an existing product, you can provide package amount and unit and comparable unit and amount. Meassurement units are provided on product variant level. For available fields, see the request body schema in the API documentation, object measureUnit.

Recycling fee in the Invoice detail

· One min read
Pavel Husa

Endpoint Invoice detail now contains information about recycling fee (contribution) for each invoice item, whereas provided and applicable. Object recyclingFee contains the fee category and amount paid for the whole item (multiplied by the number of items) and converted to the invoice currency. The fee is just informative (assumed to be part of the item price), it does not increase the invoice total amount to be paid.

New tooltip element in forms

· One min read
Martin Stehlík

In the forthcoming days, a tooltip element (or, more accurately, a span with question mark that displays tooltip content on hover) will be introduced in the VAT number form field. If you are blank template author or use heavy style modifications in forms, you will be on the safe side by hiding these tooltips in advance and by doing necessary changes after release. Tooltip elements will have class form-group-tooltip in 3rd gen templates, in older templates show-tooltip-input.