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

Adding "Extra Field" to product template

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 02-04-2015, 12:19 PM
 
jriggins911 jriggins911 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 53
 

Default Adding "Extra Field" to product template

Can anyone point me in the right direction here?

I'm attempting to add an extra field, using XC4 terminology, to all products in XC 5.1.10.

I've gone through the process of creating a module, turning the module on and am at the point where the new field entry has been adding the xc_products sql table and is displaying on the admin side.

My question is, do I now need to modify a "product" tpl in order to get it show on the front end?

I would sure would appreciate someone pointing me in the right direction. I've explored modifying a template in order to have it included but not sure what needs to be modified and how. I'd like the new field to display around the general area where the Weight and SKU are displayed, however, it appears those items have a specific attribute.weight.tpl and atrribute.sku.tpl file for each. Do I need to create similar tpl file for my new field?

I'm trying to give XC5 a chance but is seems overly convoluted to make minor additions? Is there a better way I'm missing here?

I've looked at using the custom skin module but I believe it keeps leading me back to the original issue, what tpl do I need to modify to display the new field and do I need to add a specific attribute tpl file similar to weight and sku?

Most of the knowledge base entries on topic, at least I can find, do not quite cover this particular issue and does not seem to provide enough information across the tutorials to be able to figure it out.
__________________
Digital Embroidery

X-cart Version 4.1.9
Reply With Quote
  #2  
Old 02-05-2015, 03:03 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

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

Default Re: Adding "Extra Field" to product template

Hi!

I believe you don't need a custom module as you can create "extra fields" with the attributes feature built into X-Cart 5.

Just add a "global" attribute when editing a product, and it will appear for all products. Or you can create a "class" attribute that will show up for products having that class selected on the Attributes tab.

Here is an article on this feature:
http://kb.x-cart.com/display/XDD/Product+classes+and+attributes

Is it what you are looking for?
__________________
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
  #3  
Old 02-05-2015, 06:11 AM
 
jriggins911 jriggins911 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 53
 

Default Re: Adding "Extra Field" to product template

I tried that route initially but ran into problems. Everytime I created an attribute, for instance a textarea. I would be able to associate it with the product (either globally or product specific) I could not get the field to show unless I clicked the "editable" check box. If the box was left unchecked, the field never showed. When checked, it would display.

I abandoned that route because having the information show in a expandable box was not what I was looking for.
__________________
Digital Embroidery

X-cart Version 4.1.9
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 03:17 AM.

   

 
X-Cart forums © 2001-2020