protected function wizardAddCart()
    {
        // Required
        $this->validatePrompt('user_id', $this->text('User ID'), 'cart');
        $this->validatePrompt('product_id', $this->text('Product ID'), 'cart');
        $this->validatePrompt('sku', $this->text('Product SKU'), 'cart');
        $this->validatePrompt('store_id', $this->text('Store ID'), 'cart');

        // Optional
        $this->validatePrompt('quantity', $this->text('Quantity'), 'cart', 1);
        $this->validatePrompt('order_id', $this->text('Order ID'), 'cart', 0);
        $this->validatePrompt('data', $this->text('Data'), 'cart');

        $this->setSubmittedJson('data');
        $this->validateComponent('cart');
        $this->addAddCart();
    }
protected function wizardAddCart()
    {
        // Required
        $this->validatePrompt('user_id', $this->text('User ID'), 'cart');
        $this->validatePrompt('product_id', $this->text('Product ID'), 'cart');
        $this->validatePrompt('sku', $this->text('Product SKU'), 'cart');
        $this->validatePrompt('store_id', $this->text('Store ID'), 'cart');

        // Optional
        $this->validatePrompt('quantity', $this->text('Quantity'), 'cart', 1);
        $this->validatePrompt('order_id', $this->text('Order ID'), 'cart', 0);
        $this->validatePrompt('data', $this->text('Data'), 'cart');

        $this->setSubmittedJson('data');
        $this->validateComponent('cart');
        $this->addAddCart();
    }
protected function wizardAddCart ( ) { // Required $ this -> validatePrompt ( 'user_id' , $ this -> text ( 'User ID' ) , 'cart' ) ; $ this -> validatePrompt ( 'product_id' , $ this -> text ( 'Product ID' ) , 'cart' ) ; $ this -> validatePrompt ( 'sku' , $ this -> text ( 'Product SKU' ) , 'cart' ) ; $ this -> validatePrompt ( 'store_id' , $ this -> text ( 'Store ID' ) , 'cart' ) ; // Optional $ this -> validatePrompt ( 'quantity' , $ this -> text ( 'Quantity' ) , 'cart' , 1 ) ; $ this -> validatePrompt ( 'order_id' , $ this -> text ( 'Order ID' ) , 'cart' , 0 ) ; $ this -> validatePrompt ( 'data' , $ this -> text ( 'Data' ) , 'cart' ) ; $ this -> setSubmittedJson ( 'data' ) ; $ this -> validateComponent ( 'cart' ) ; $ this -> addAddCart ( ) ; }
Add a new cart item step by step
Add a new cart item step by step