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

Show extra field in admin search results

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-15-2014, 11:16 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Show extra field in admin search results

We are currently trying to show an extra field in the search results on the admin side. We have created a new column for this, but cannot it to work.

Our extra field is "Cost" (what it costs us to purchase the product if we do not have it in stock) and is very helpful for our Ordering Department.

We want to be able to quickly search for an item, see if we have it in stock, and edit/see the Cost of the item just as if we were editing the Selling Price.

We are using X-Cart 4.5.5 GOLD and have gotten nowhere. We've tried following the threads to implement it onto the invoice but it does not work the same in search results.
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #2  
Old 09-29-2014, 10:38 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: Show extra field in admin search results

UPDATE: We tried to follow this post: http://forum.x-cart.com/showthread.php?t=63314

But were unable to get this to work. Our issue is that we can't get the foreach loop to pull an extra field value from it's corresponding product, or any product in that case.
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #3  
Old 03-03-2015, 07:09 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: Show extra field in admin search results

Bump, has anyone else ever tried to do this?
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #4  
Old 03-03-2015, 07:19 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default Re: Show extra field in admin search results

Hi McAnitano...

I'm not sure if this is possible as i've just enabled the Debug Console on an XC 4.5 installation and the {$products} variable isn't outputting the extra fields data for each product.

Some of the PHP Code will need to be adjusted to grab the extra field data.
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #5  
Old 03-03-2015, 09:26 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: Show extra field in admin search results

Well, we took your advice and did this on the PHP side, except not with Extra Fields.

We custom added a new data field "dealer_cost" to the xcart_products array using phpMyAdmin, then went into include/product_modify.php and added
Code:
'dealer_cost' => $dealer_cost,

after
Code:
'title_tag' => $title_tag,

around line 900

and added to main/product_details.tpl after List Price

Code:
<tr> {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[list_price]" /></td>{/if} <td class="FormButton" nowrap="nowrap">{$lng.lbl_dealer_cost} <span class="Text">({$config.General.currency_symbol}):</span></td> <td class="ProductDetails"><input type="text" name="dealer_cost" size="18" value="{$product.dealer_cost|formatprice|default:$zero}" /></td> </tr>
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
  #6  
Old 03-03-2015, 11:39 PM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default Re: Show extra field in admin search results

Ah OK ... Thats fine.
So are you still having trouble? Or are you all set?
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #7  
Old 03-05-2015, 05:00 AM
  mcanitano's Avatar 
mcanitano mcanitano is offline
 

eXpert
  
Join Date: Feb 2006
Location: Melbourne, FL
Posts: 216
 

Default Re: Show extra field in admin search results

We're all set, works fine the way we did it!


(custom extra field in PHP).

Thanks for the help.
__________________
Marcello Canitano
New Site: X-Cart v4.5.5 GOLD
X-Cart Mobile v1.4.3
X-Payments v1.0.6
CDSEO Pro v2
Total Server Solutions xCDN

www.silverhorseracing.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 07:52 PM.

   

 
X-Cart forums © 2001-2020