You are here:  » field mapping

Support Forum



field mapping

Submitted by rolli1 on Mon, 2013-01-28 18:01 in

Hi David,
I would like to add a field or to change the content of a field.
Would this be possible by coding or hy hand?

Regards

Roland

Submitted by support on Mon, 2013-01-28 20:32

Hi Roland,

In terms of adding brand new fields (not part of the normal database) all the instructions are in this thread. Otherwise, without having to making coding changes you can change data during import using the range of filters that are available.

Finally, coding changes for complex requirements can be added to the import record handler process if required. If you could give me a few more details - ideally some worked examples of data that you have in the feed, and how you want to change it before import i'll be able to point you in the right direction...

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Tue, 2013-01-29 09:33

Hi David,

I get datafeeds with the following fields

ProductID ProductName ProductURL BuyURL ImageURL Category CategoryID PFXCategory BriefDesc ShortDesc IntermDesc LongDesc ProductKeyword Brand Manufacturer ManfID ManufacturerModel UPC Platform MediaTypeDesc MerchandiseType Price SalePrice VariableCommission SubFeedID InStock Inventory RemoveDate RewPoints PartnerSpecific ShipAvail ShipCost ShippingIsAbsolut ShippingWeight ShipNeeds ShipPromoText ProductPromoText DailySpecialsInd GiftBoxing GiftWrapping GiftMessaging ProductContainerName CrossSellRef AltImagePrompt AltImageURL AgeRangeMin AgeRangeMax ISBN Title Publisher Author Genre Media Material PermuColor PermuSize PermuWeight PermuItemPrice PermuSalePrice PermuInventorySta Permutation PermutationSKU BaseProductID Option1 Option2 Option3 Option4 Option5 Option6 Option7 Option8 Option9 Option10 Option11 Option12 Option13 Option14 Option15 Option16 Option17 Option18 Option19 Option20

So, let me say, I wand to add text to the Option 10 e.g. And then I want to import a new field called e.g. "Specials". As far as I understand I have to build a new field to the database but how do I get the new field working?

Regards

Roland

Submitted by support on Tue, 2013-01-29 09:56

Hi Roland,

So let's say you want to add a `specials` field to your database, first you would do this by following the instructions in this thread. Then, when you came to register the above feed, you could map the field "DailySpecialsInd" to your new "Specials" field, and it would then be imported, and available for you to display within the html/ modules using $product["specials"]

Now if you want to add text to the specials field, including your own text _and_ the value of the Option10 field in that particular feed, you could use a Text After (or Text Before) filter (documentation) which support placeholders for pulling in the value of other fields in the feed, so in this case, you might add a new Text After filter to the "Specials" field for this feed, and in the text box on the configuration page for the filter you might enter:

 Some Custom Text %Option10%

(don't forget any spaces at the start otherwise there would be no spaces after the original field content and your Text After filter content after the filter is applied!)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Tue, 2013-01-29 16:01

Hi David,
thanks a lot
ROland

Submitted by rolli1 on Tue, 2013-01-29 17:19

Hi David,
I created a field called "keywords" and it was propperly entered into the database. This field is registered as FIELD22

I revied the database and everything is ok.

Then I configered a text after filter with ....some text....%FIELD22% and registered it

but it does not show off. Could you look into

{link saved}

Regards

Roland

Submitted by support on Wed, 2013-01-30 08:40

Hi Roland,

I see you added the filter as a global filter, in order to use the other field placeholders e.g. %FIELD22% the filter would need to be added as a per-feed filter, so rather than use the Global Filters menu option, delete the version from there and then click Filters alongside your feed and add the filter there - that should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Wed, 2013-01-30 14:49

Hi David,
I deleted the global filters and entered a text before filter on registering the feed, buit it does not work?
Could you be more descriptive because obvieously I don't understand.

Regards

Roland

Submitted by support on Wed, 2013-01-30 14:58

Hi Roland,

If the feed is being imported with %fieldname% showing instead of being replaced, that means that fieldname doesn't exactly match the name of the field that you are trying to incorporate.

To find out the value to use, look at the Sample Data shown on Feed Registration Step 2, for example if your field name is Option10 then the placeholder as used in the text box on the configuration page for a Text After / Text Before filter would need to be:

%Option10%

If you're still not sure, if you could post the /admin/ link again and describe the filter that you're trying to create I'll check it out for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Fri, 2013-02-01 09:15

Hi David,

the link is:

{link saved}

I wanted to establish a filter within the feed ( Register Filter Import ). If you open the Filter you will see what i did.
From the beginning:

I added a field called "keywords" to the database. This was done correctly. Then, as you proposed, I installed the filter with %keywords%at the end, but this step does not work. The text does not show off.

Regards
Roland

Submitted by rolli1 on Fri, 2013-02-01 09:24

Again me.

the field keywords has the text encluded, when I look into the database. I find the text of the filter. But how about the Output on the Website? I can not find it.

regards

Roland

Submitted by support on Fri, 2013-02-01 10:25

Hi Roland,

Thanks for the admin link - in this case, I don't think you actually need to use placeholders at all since you only want to insert your custom text infront of the existing keywords field.

I went to Feed Registration Step 2 for your feed, and it looks like the keywords field, since the feed does not have a header row, is actually FIELD33, so first of all make sure that is the field you have registered against your keywords custom field.

Then, to insert your required text immediately before the keyword list, simply use a Text Before filter against the Keywords field, and in the text box on the configuration page for the filter, simply enter:

"Intimate apparel from "

...without quotes, but notice the SPACE at the end!

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Fri, 2013-02-01 11:49

Thanks very much.

Regards and best wishes

Roland

Submitted by rolli1 on Fri, 2013-02-01 13:34

Hi David,
I think I have done everything what you mentionned but the text will not shof off on the Website.

regards

Roland

Submitted by support on Fri, 2013-02-01 13:57

Hi Roland,

I think it will now be down to the code in your template to display the custom keywords field. I presume you want this displayed in the <head> area of your product pages as the meta keywords field, so in your products.php, see if you still have the default version from the distribution which is this code at line 68:

  $header["meta"]["keywords"] = htmlentities($q,ENT_QUOTES,$config_charset);

...and if you do, REPLACE that with:

  $header["meta"]["keywords"] = htmlentities($product["products"][0]["keywords"],ENT_QUOTES,$config_charset);

...and that will display the content of your custom `keywords` field insted!

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Fri, 2013-02-01 15:21

Hi David,

Where does this code display my keywords?

Regards

Roland

Submitted by support on Fri, 2013-02-01 15:34

Hi Roland,

They will come out in the <head> area of your page, which is where the keywords meta tag is designed to go (as they are for search engines) but you can output the field anywhere you want in the page.

Please could you email me your products.php and also html/product.php and describe in your email exactly where you want to display your keywords field and I'll add the code for you...

Cheers,
David.
--
PriceTapestry.com