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

New Field in product page

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 05-28-2015, 07:14 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: New Field in product page

{**
* @ListChild (list="product.details.page.info", weight="50")
*}
<li class="product-availability">
<span class="name">{t(#Availability#)}</span>
<span class="product-availability-value">{item.product.getProductAvailability()}</span>
</li>
__________________
Ver 5.2.6
Reply With Quote
  #12  
Old 05-28-2015, 07:49 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: New Field in product page

Here are the files in my mod if you want to take a look Tony. I have no doubt that I'm overlooking something simple. I'm still trying to learn the ins and outs of xcart 5.
Attached Files
File Type: zip product availability.zip (5.1 KB, 198 views)
__________________
Ver 5.2.6
Reply With Quote
  #13  
Old 05-29-2015, 03:19 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: New Field in product page

Hello Phil,

I see. Your code should be as follows:
Code:
{** * @ListChild (list="product.details.page.info", weight="50") *} <li class="product-availability"> <span class="name">{t(#Availability#)}</span> <span class="product-availability-value">{product.getProductAvailability()}</span> </li>

In other words, I replaced item.product. construction with just product. one.

Tony

Quote:
Originally Posted by Phil Richman
{**
* @ListChild (list="product.details.page.info", weight="50")
*}
<li class="product-availability">
<span class="name">{t(#Availability#)}</span>
<span class="product-availability-value">{item.product.getProductAvailability()}</span>
</li>
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
Phil Richman (05-29-2015)
  #14  
Old 05-29-2015, 05:03 PM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: New Field in product page

Tony,

Thank you very much for your help. Your fix worked perfect. I decided that I also wanted to display the sku field in this template. So I modified my .tpl to


{**
* @ListChild (list="product.details.page.info", weight="50")
*}
<li class="product-availability">
<span class="product-availability-name">{t(#Availability:#)}</span>
<span class="product-availability-value">{product.getProductAvailability()}</span>
</li>
<li class="product-availability">
<span class="product-availability-name">{t(#SKU:#)}</span>
<span class="product-availability-value">{product.getSKU()}</span>
</li>


This works except for items that have variants. It shows the base sku and not the variant sku. How can I modify this so that it will reflect the sku of the selected variant?
__________________
Ver 5.2.6
Reply With Quote
  #15  
Old 06-03-2015, 03:49 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: New Field in product page

Do I understand you correctly that you want to display this widget on product details page? If so, could you please try to call getSKU() instead of product.getSKU() and let me know if does the trick.

Thank you.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #16  
Old 01-12-2017, 01:55 AM
 
dharmendralko dharmendralko is offline
 

Member
  
Join Date: Jun 2015
Location: Lucknow, India
Posts: 21
 

Default Re: New Field in product page

Hi Tony,

i had added some new fields to product by using my custom module and follow your doc http://devs.x-cart.com/en/basics/model_editing_page.html in X-Cart Business 5.2.13

when i upgrade X-Cart Business 5.2.13 to X-Cart Business 5.3.1.2, product fields are here but not show into admin area. While in old version (X-Cart Business 5.2.13) its working fine. Fields are showing and we can can edit its value

please let me know how get my custom fields and it value into admin area on product edit page.

Thanks
__________________
Dharmendra Rao
PHP Developer
Lucknow, India
Reply With Quote
  #17  
Old 01-12-2017, 02:25 AM
 
dharmendralko dharmendralko is offline
 

Member
  
Join Date: Jun 2015
Location: Lucknow, India
Posts: 21
 

Default Re: New Field in product page

Hello X-cart Team,

i have show my custom field by using XLite\Module\XC\CustomSkin\ProductField\View\FormM odel\Product Info class extends by \XLite\View\FormModel\Product\Info implements \XLite\Base\IDecorator

i have show all fields into new section by using function defineSections() in my XLite\Module\XC\CustomSkin\ProductField\View\FormM odel\Product Info class

so now i can see my custom field into admin on product edit page.

please let me know how i can fetch its value from database and edit that values from admin product edit page


Thanks
__________________
Dharmendra Rao
PHP Developer
Lucknow, India
Reply With Quote
  #18  
Old 01-15-2017, 10:09 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: New Field in product page

Please check this article on customizing product fields:
http://devs.x-cart.com/en/basics/adding_new_property_to_a_product/adding_product_property_via_formmodel_api.html
__________________
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
  #19  
Old 01-15-2017, 10:37 PM
 
dharmendralko dharmendralko is offline
 

Member
  
Join Date: Jun 2015
Location: Lucknow, India
Posts: 21
 

Default Re: New Field in product page

Hi,

i have completed this, but i want to know that how i can set product priority (orderby) manually to set ordering of product for product listing page in front-end?

there are no area to set this in back-end
How i can do this?

Thanks
__________________
Dharmendra Rao
PHP Developer
Lucknow, India
Reply With Quote
  #20  
Old 01-17-2017, 02:32 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: New Field in product page

You can configure the order in which products appear on category pages as follows:
1. Go to Categories
2. Click on the number of products in the category that you want to change (see the screenshot)
3. Use the handle icon to the left of products to move them and change their order
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	210
Size:	125.6 KB
ID:	4798  
__________________
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)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:12 AM.

   

 
X-Cart forums © 2001-2020