• Hello,

    I tried to use different plugin to allow the user to add extra information in a text area when adding a product to a gift list.
    Still, I was not able to succeed.
    The information enterred is not added to the gift list.

    Can you help me on that ?

    Thanks,

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nmerii

    (@nmerii)

    Hello mldno,

    Please explain more clearly what you are trying to do so that I can help. Where did you place the textarea code and what form is it saving to?

    Thread Starter mldno

    (@mldno)

    Hello nmerii,

    I tried to add a text area in the single product page.
    The text area is input field is provided by different pluggin such as “Advanced Product Fields for WooCommerce” for example.
    But when I enter a text in the text area and then add the product to the gift list, this text is not saved in the details of the product in the gift list.

    Basically, I would like that my users that create gift list could be able to add some additionnal information (specific requests) on each product they are adding to the gift list. These informations should be visible by me (as an admin) to see if I can fulfill these requests.

    Hope it’s clearer.

    Plugin Author nmerii

    (@nmerii)

    I think I understand what you are saying.
    Firstly, you should be able to know how the additional information is saving in the database to be able to get it. I believe you already know this. Once you can get the information from the database you can then display the information in the gift list template.

    Let me know where you want the information to show up in the gift list so that I can guide you on the action hook to use. It would just be a case of displaying this information only in the admin as you want, so that you can see it.

    Thread Starter mldno

    (@mldno)

    Unfortunately, I don’t know where the information is stored in the DB. Even more, I’m not sure it is stored at all because we use the add to gift list button instead of add to cart button.

    Do you have another option in mind that can help us ?

    Thanks,

    Plugin Author nmerii

    (@nmerii)

    If you used the add to gift list button, it is likely the product was added to the gift list by ajax that’s why the additional information could not be saved in the database.

    In this case there are two solutions to save the additional information in the database so that you can retrieve it later.

    1. You can add the product to the gift list through a normal http request rather than ajax so that the additional information would save as the page reloads. Unfortunately adding products to the gift list this way can only be done in the full version of the plugin.

    2. When a product has been added to the gift registry via ajax, an event nmgr_added_to_wishlist is triggered on the document body. You can hook into this event in javascript and save the additional information on the page. This method can be used in both the lite and full versions of the plugin. It’s very straightforward but you would need to be slightly familiar with javascript to use it.

    Thread Starter mldno

    (@mldno)

    I already have the full version of the plugin.
    Can you guide me to implement your solution 1 ?

    Thanks,

    Plugin Author nmerii

    (@nmerii)

    On the plugin settings screen,
    1. Click on the ‘Modules’ tab.
    2. By default you should be on the ‘add to wishlist button’ settings.
    3. Scroll down and look for the setting ‘Ajax enabled on single product pages’. Untick this setting.
    4. Save the plugin settings.

    Thread Starter mldno

    (@mldno)

    OK I did this.
    Now, how can I display the information on the admin page ?

    Plugin Author nmerii

    (@nmerii)

    First of all have you been able to get the information from the database? There should be a normal way that the plugin you are using to save the information allows you to get it. Also where exactly in the admin do you want to display the information?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add input text when adding to gift list’ is closed to new replies.