Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add New Field To Product page in x cart 5.3.1.3

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-07-2016, 08:57 PM
 
vigneshkutty vigneshkutty is offline
 

Member
  
Join Date: Jul 2016
Posts: 24
 

Thumbs up Add New Field To Product page in x cart 5.3.1.3

Hi,

In My store (x cart 5.3.1.3) Admin, I want add a field in both category and product.

But i done in Category because i know Where to Create A new Field in Category.

For Category i been Working in below two files.

1.XLite\Module\<developer_ID>\<Modules_id>\Model - Category.php

2.XLite\Module\<developer_ID>\<Modules_id>\View\Mo del -Category.php

And Also i did Same for product But I can't see that Field

1.XLite\Module\<developer_ID>\<Modules_id>\Model -Product .php

2.XLite\Module\<developer_ID>\<Modules_id>\View\Mo del -Product.php

In old Version of X cart (5.2.x) i can See Both field But In x cart 5.3.1.3 Where i do Custom For Add field In product .

And Also i find Some product Related Files Still i can't see my field. i been Working for product below files.

XLite\Module\<developer_ID>\<Modules_id>\View\Form Model\Product - Info.php

My Code

protected function defineFields()
{
$new_fields = [];
foreach (\XLite\Core\Database::getRepo('\XLite\Module\<dev eloper_ID>\<Modules_id>\Model\new_field')->findActiveNewfield() as $new_field) {
$new_fields[$new_field->getId()] = $new_field->getName();
}
$schema = parent::defineFields();

$schema = static::compose(
$schema,
[
'prices_and_inventory' => [
'website_product' => [
'type' => 'XLite\Module\<developer_ID>\<Modules_id>\View\For mField\Select\new_field',
'label' => static::t('Newfield'),
'multiple' => true,
'choices' => array_flip($new_fields),
'choices_as_values' => true,
'position' => 600,

],

],
]
);

return $schema;
}

Still i didn't See my field in my store Admin.. Kindly Suggest Me What do to....

Awaiting For your Reply.

Thanks,
Vignesh Kutty.
__________________
kutty
Reply With Quote
  #2  
Old 09-07-2016, 09:09 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Add New Field To Product page in x cart 5.3.1.3

https://forum.x-cart.com/showpost.php?p=398666&postcount=13
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 09-12-2016, 01:45 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Add New Field To Product page in x cart 5.3.1.3

And here is another thread:
https://forum.x-cart.com/showthread.php?t=74411
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:55 PM.

   

 
X-Cart forums © 2001-2020