I know that there is this variable "$aData[iProduct]" i also know what is all about. I try to Integrate this variable to product pages.
For an application i need to transfer the value of this variable using a simple form. I use this line of code in my form on product (full) description:
I want to send the "Product Number" from a simple html from on full description body to an external script for an application i want to implement.
I can do it manual using this type of code : <input type="hidden" name="VarName" value="XX" /> Where "XX" is the Product Number, but i like to do it using the '$aData[iProduct]" variable in order to avoid manually editing every product full description.
I hope this second message make the case more clear.
The problem is: the '$' character declares a variable - OK. but it is used in the database as field_split_character. If you put this into the description, you will get one field more in the data set and resulting mismatch. If you will use the $ as dollar sign, you will see the text "$aData[iProduct]" and not the value of variable. Use the <input ...> line outside of full description in the products_default.tpl
boboo thank you for your answer I'm not sure that i get it 100%
Finally is it possible to receive from a form inside the body of full description the value of "$aData[iProduct]" variable or not?
I try to put the code line <input type="hidden" name="VarName" value="$aData[iProduct]" /> as you suggest on the appropriate template file (.tpl) but i don't get any value after send the data using the for. I also can't see anything different on the product page. I also try: <input type="hidden" name="VarName" value="$aData[iProduct]" /> without succes, i receive all the values of the form but not the value of the "$aData[iProduct]" variable, i just get the name of the variable as value ($aData[iProduct]).
i just put the $aData[iProduct] somewhere in the products_default.tpl (exactly: behint the currency symbol) and i see the number of product there. you want to send it to another script? use the GET method.
thank you for your answer. unfortunately i'm unable to solve my problem.
I now put the "$aData[iProduct]" on the appropriate (.tpl) and i can see the value. But i can't send this value to the other script. I try every trick i know and i spend sometime searching around the net for a solution but i just can't do it.
I use: $_GET['iProduct']; $_GET['aData[iProduct]']; $_GET['$aData[iProduct]']; $_GET['$aData[iProduct]']; but nothing works...
All the other values i need (from the form) pass to the next script, But i can't see how can i "get" a value outside the form (since i put the "$aData[iProduct]" on template is now outside the form.
Actually this was the first trick i tray, but you mention that it is not possible to put this code INSIDE the full description body of the product. If i put this line of code INSIDE the full description body (where my form is) i get as value the "$aData[iProduct]" string and not the real value.
I also try put this code on template (.tpl) but doesn't work i get nothing
@Makaron Thank you for the answer. i actually had the same thought yesterday, and i try to implement it but i was tired and my mind wasn't clear enough to do it. further more i had no idea where to start. Now i will follow your suggestion and i will read the appropriate documentation. I hope finally to implement what i have in my mind!
I make big progress i finally figure out for to code my form and pass all the data and valuer i want to my script. The only problem i have now is that i must change to .css Is it possible to use two different .css files one (default) for all the other products and another (e.g.: "myCSS") only for the products i like to use the form i make ? Where i hate to start ? Is there any documentation ?
Yes - one way is to import "myCSS.css" into default.css and use elements named specific for your form. See default.css on line 4 how plugin.css is imported.