View Single Post
  #3  
Old 11-15-2005, 10:26 PM
 
jagorny jagorny is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 98
 

Default Thanks but no thanks...

Actually that's an elegant hack. I liked it and used it but ran into problem #2 so hopefully through our teamwork we can provide a full solution.

Yes your solution makes extras global and visible, but try including any of these global extra fields in an imported csv and it fails. The import function will not find the global and will simply recreate the provider specific extra field to correspond to the data it is trying to push.

It is necessary to modify the following:

file: /cart/provider/import.php

Search for #set extra_fields and it takes to around line 1049 (4.0.16)

make the following adjustment to the query that pulls valid extra_fields based on the label:

replace $tmp_provider_condition...

normally it represents " AND provider='$login'"

it should be " AND (provider='$login' OR provider='root')"

assuming you have a root login provider creating global extra fields...

[/code]
__________________
Jacob Gorny
E-commerce Lead, Applications Developer
Greek Orthodox Archdiocese

Running X-Cart Pro 4.1.10
RHEL5 | Apache 2.2.8 | PHP 5.2.6
Reply With Quote