0

We have develop own module for wedding planner. We post multiple products with description on form submit. How to get the "wedding" array in the below values.

Array
(
    [weeding] => Array
        (
            [pCategory] => Array
                (
                    [0] => -1
                    [1] => 45
                )

            [product_cat] => Array
                (
                    [0] => 
                    [1] => 14
                )

            [product_cat_input] => Array
                (
                    [0] => 23423
                    [1] => 
                )

            [product_qty] => Array
                (
                    [0] => 24
                    [1] => 23423
                )

            [product_description] => Array
                (
                    [0] => 234
                    [1] => 234
                )

            [metal_type] => Array
                (
                    [0] => 23
                    [1] => 234
                )

            [stone] => Array
                (
                    [0] => 2423423
                    [1] => 234
                )

            [weight] => Array
                (
                    [0] => 23
                    [1] => 23
                )

            [size] => Array
                (
                    [0] => 23
                    [1] => 23
                )

        )

    [fromprice] => 2
    [toprice] => 23
    [description] => 234
    [name] => vijay Kumar
    [email] => [email protected]
    [address] => Address
    [telephone] => 89
    [country] => IN
    [region_id] => 
    [region] => tamilnadu
    [city] => chennai
    [postcode] => 641029
)

We tried the below line. but this get all the value of post.

$post = $this->getRequest()->getParams('wedding');

Please advice for this.

3
  • 1
    Is this a typo '[weeding] => Array' Commented Feb 18, 2015 at 10:46
  • @tecjam<please put this as answer Commented Feb 18, 2015 at 10:48
  • @Amit: I'm not sure if this is the cause of the problem, or just a typo when creating the question. :) Commented Feb 18, 2015 at 10:56

2 Answers 2

1

It should be: $post = $this->getRequest()->getPost('wedding');

If you use getParams() it returns the entire $_POST

Checkout class: Zend_Controller_Request_Http to see all the different methods available to access $_Request, $_Get and $_Post params.

0

you can use getParam() instead of getParams()$post = $this->getRequest()->getParam('wedding');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.