Hello,
I tried to add a new field to my product creation and the result is that I can´t save the product and have the next issues:
Este campo link_rewrite se requiere por lo menos en Español (Spanish).
I make the next changes:
1. Add create new field in ps_product table.
2. Add create new field in ps_product_shop table.
3. Modify core files in classes/product.php
/** @var enum Product condition (brand, official store, store, professional seller, private seller) */
public $seller_type;
'seller_type' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('brand', 'official store', 'store', 'professional seller', 'private seller' ), 'default' => 'brand'),
4. Modify product edit .tpl file located in this path:
ADMIN_DIR/themes/default/template/controllers/products/informations.tpl
<div class="form-group">
<label class="control-label col-lg-3" for="seller_type">
{include file="controllers/products/multishop/checkbox.tpl" field="seller_type" type="default"}
{l s='Seller type'}
</label>
<div class="col-lg-3">
<select name="seller_type" id="seller_type">
<option value="brand" {if $product->seller_type == 'brand'}selected="selected"{/if} >{l s='Brand'}</option>
<option value="official store" {if $product->seller_type == 'official store'}selected="selected"{/if} >{l s='Official store'}</option>
<option value="store" {if $product->seller_type == 'store'}selected="selected"{/if}>{l s='Store'}</option>
<option value="professional seller" {if $product->seller_type == 'professional seller'}selected="selected"{/if} >{l s='Professional seller'}</option>
<option value="private seller" {if $product->seller_type == 'private seller'}selected="selected"{/if} >{l s='Private seller'}</option>
</select>
</div>
</div>
5. Finally modify the THEME product.tpl (to show the result on my shop)
{capture name=seller_type}
{if $product->seller_type == 'brand'}{l s='Brand'}
{elseif $product->seller_type == 'official store'}{l s='Official store'}
{elseif $product->seller_type == 'store'}{l s='Store'}
{elseif $product->seller_type == 'professional seller'}{l s='Professional seller'}
{elseif $product->seller_type == 'private seller'}{l s='Private seller'}
{/if}
{/capture}
<p id="product_condition"{if !$product->seller_type} style="display: none;"{/if}>
<label>{l s='Seller type'}: </label>
<span class="editable" itemprop="seller_type">{$smarty.capture.seller_type}</span>
</p>
Really need your help with this.
Thank you,
Alex.