May 25, 2010 at 2:23 am #1252
I have a template that I made that hides the add to cart button until a set of questions are answered and terms agreed to.
I need a way to record that data against the purchase for legal reasons. Is there a way of pushing my own data into the custom field so that the IPN returns with it?
I don’t care where it is store I just need a record
StuartMay 25, 2010 at 8:35 am #20931
The name of the product is stored in a hidden field called “product” so you will need to append the text to the value of that field and it will get recorded as it will stay with the product name.May 27, 2010 at 1:51 pm #20932
Which form should I modify?
Do I add it to the add to cart button? I started to do that but then realised when I looked at the shopping cart that the name I had added didn’t seem to make it through, but I don’t know if it should or shouldn’t show there.
I need to make sure I am adding it only if they have agreed to all the questions (I submit the form back on itself, validate, then show the add cart button using a filter on the_content)
ThanksMay 28, 2010 at 12:20 am #20933
You don’t have to modify any code on the eStore. The “Add to Cart” button is a form. This form has a hidden input field called “product” which holds the value of the product name.
What’s the difference between ‘product’ and ‘product_name_tmp1’?
The only place I need to see anything is in the admin area against the purchase but I don’t see an ‘orders’ panel. (I kinda missed the bit where your product was meant only for digital downloads, I was kinda hoping for an orders pane with the ability to see all the items to ship and also be able to check off when the order was shipped. In that pane I would have liked to have seen the record of whether the customer had agreed or not.)
To sum up, is it correct that right now I can only change the name using ‘product_name_tmp1’ and that the client will also see this name in the interface?
StuartJune 2, 2010 at 6:11 am #20935
“product_name_tmp1” is just a temporary variable that has it’s usage. You need to change the value of the “product” input field. If you can change it then when they add the product to the shopping cart, the cart will have this new name.
For example if the name of the product is “Test Product” then the value of the “product” field will be “Test Product”. Now if you modify it and give it the following name
“Test Product (some custom text)” then when you add the product to the cart it will use this new name.June 3, 2010 at 7:04 am #20936
I was setting product before ReadForm1 and it was getting overridden with a regular product_name_temp1. So if I set product_name_temp1 to my value (as I do now) then product gets set correctly inside ReadForm1.
Phew, I couldn’t work out why it was working opposite to what you were saying. I was setting it before submission.
StuartJune 13, 2010 at 7:30 am #20937
I’ve noticed that the name ‘product’ value is not recorded in the database and is only used in the emails, it looks like only the product_id is recorded.
I know this is more a feature request but are you looking at providing an ‘order management’ page? For my client I would like to see a whole order (including ‘product’ name) in one place, nice and easy.
I was thinking of making a plugin to make my own view of the data but first and foremost the IPN data is treated in WPeStore and without the modified ‘product’ name being recorded it wouldn’t entirely suit my purposes for legal records. If you were to record at least that data in the customer table I could view by TXN and show each cart item (with modified name) nicely.
StuartJune 14, 2010 at 4:05 am #20938
I am expanding the customer’s database to add the “Product Name” and “Customer’s address” so once I am done with this you should be fine (I should have it implemented in a few days)June 14, 2010 at 11:38 am #20939
That’s awesome!!!June 15, 2010 at 2:00 am #20940
I have added this to the plugin so please request an update and you should have it.
- You must be logged in to reply to this topic.