pantocazo Posted November 17, 2010 Share Posted November 17, 2010 Hi.I was told to develop a feature that insert videos on the product page, not as an image or a product feature but in a new tab called "Video" on the frontend. I've managed to do that, no problem.In the backend product page (AdminProducts.php) I tried to add a new tab (8. Videos) that shows a form where you have to enter the url, name and description of the video, data that will be inserted in a new table I made. When I click on the "8. Videos" option, I see the form for a second but then dissapears.I tried to copy the displayFormImages function and modify it to ask for the fields I need. The new function is called displayFormVideos. The function has no code yet, just the html of the form but I can't get the admin product page to show it for more than just a second. This is the code of the function right now: function displayFormVideos($obj, $token = NULL) { echo ' 2. '.$this->l('Videos').' '.$this->l('Add a new video to this product').' '.$this->l('URL:').' <input type="text" id="video_product" name="video_product" /> '; } The function is called in the displayForm function just after the "7. Attachments" line: $this->displayFormVideos($obj, $this->token); I also added a value to the toload array: toload[8] = true; Any ideas?Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts