laitimes

Repeater data summation - the total unit price of items in the shopping cart

Implementation steps:

Step 1: Create a new repeater summation page.

Repeater data summation - the total unit price of items in the shopping cart

Step 2: Make a shopping cart prototype page

Two repeaters are made in the prototype: one is the product name and picture, and the other is the price; Enter the content separately in the dataset.

Repeater data summation - the total unit price of items in the shopping cart

Step 3: From the widget window, drag 1 rectangular widget,

> Set line color, fill color, font color transparency: 100%;

>设置位置与大小:x:0 y:0 w:1024 h:390

> the right-click shortcut menu to set the rectangle to the bottom layer

> the Part Interaction and Annotation window, set the rectangle name to: Launch

Repeater data summation - the total unit price of items in the shopping cart

Step 4: Make a copy of the "Start" rectangular part

> set the size: W:160 H:35 and put it behind the total

> the Part Interaction and Annotation window, set the copy name to: Total

Repeater data summation - the total unit price of items in the shopping cart

Step 5:

Select the "Launch" widget, the widget interaction and annotation windows, double-click the "When Mouse Moves" event to open the Use Case Editor, edit Use Case 1:

Action 1:

Step 2: Click Add Action and select the "Set Text" section

Step 4: Configure the action Select Part Settings Text: Select "Current Part" Set the text to: Value [[LVAR1]]

Description of the text value setting

Click "fx" to open the edit text window: add local variable LVAR1: LVAR1=widget "Price (Repeater)"

Click the "Insert Variables, Attributes, Functions, or Operators" button, and select Repeater/Dataset under Repeater; The text input box will read: [[LVAR1]]

Action 2:

Step 2: Click Add Action and select the "Set Text" section

Step 4: Configure the action Select the part settings text: Select "Total" Set the text to: value [[LVAR1.slice(0,4)+LVAR1.slice(5,9)]]

Description of the text value setting

Click "fx" to open the edit text window: add local variable LVAR1: LVAR1=part text "start"

Click the "Insert Variables, Attributes, Functions, or Operators" button, and select Repeater/Dataset under Repeater; The text input box will be displayed as [[LVAR.slice(start,end)]], change the variable name to LVAR1, and set the start and end character bits: 0 and 4

The copy of the duplicate variable is followed by a "+" between the two variables, so that the text box reads: [[LVAR1.slice(0,4)+LVAR1.slice(5,9)]]

Click "OK" to close the window

Repeater data summation - the total unit price of items in the shopping cart

Step 6: Generate a prototype and see the effect

Repeater data summation - the total unit price of items in the shopping cart

Read on