Jump to content

Recommended Posts

Dear Friends,

 

I want to add new field like (product name, reference or UPC ...) to add new product page, and save it to database like other product info for using it on front product page.

 

I configured informations.tpl file and add needed field as;

 

 

<tr>

<td class="col-left"><label>{$bullet_common_field} {l s='rURL:'}</label></td>

<td style="padding-bottom:5px;">

<input size="55" type="text" name="rURL" value="{$product->rURL|htmlentitiesUTF8}" style="width: 130px; margin-right: 44px;" />

<span class="hint" name="help_box">{l s='Special characters allowed:'}.-_#\<span class="hint-pointer"> </span></span>

</td>

</tr>

 

I also added new column to database table products, name called "rURL". Now what should I do for field content to be saved related column and to be edited like other product fields?

 

My prestashop is 1.5.

 

Please Help,

 

Ergin,

Link to comment
Share on other sites

Ok, i also modified classes/product.php adding lines below;

 

public $rURL;

 

and

 

'rURL' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'),

 

among other fields.

 

Then when i try to add new product it gives error "An error occurred while creating object. product" and create empty product.

 

I feel i am on the right way but what i am missing?

 

Please help guys..

Link to comment
Share on other sites

  • 4 weeks later...

Hi Marcis, thanks for you reply. What kind of override is it? What i am trying to do; I want to enter a website link (my another website's product page link) while adding new product, that is why I need new field. Then I will get that link info from database to product page, together with other product info, and will use it for redirect. However, system gives error and doesn't add any information to database after the modification I made

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...