Product Import for VirtueMart - DEMO
Toggle Bar

Elements with HTML as customfields

Source: Thermogaz (Greece)
URL: https://www.thermogatz.gr/thermogatz-xml-feed
Template URL: https://import.minijoomla.org/administrator/index.php?option=com_productimport&view=productimport&id=18

Preview:

Source - customfield with HTML

 

Preview - customfield with HTML

 

 

Problems:

1. images in HTML don't have domain from imported XML - https://www.thermogatz.gr



Solution:

1. Import element as customfiled type EDITOR (customfiled type X)

a. Go to the Customfields list in VM and create customfiled type Group - Import Thermogatz
b. Remember ID for next use (448)
c. Put right setup for import elements from XML as customfiled in TAB Custom Fields

{Custom Symbols|Custom_symbols||X|0|0|448|on-import}

where

  • Custom Symobols - is the name of CustomFiled after import (will be create automatically by import)
  • Custom_symbols - is the name of element in XML import file
  • X - type of customfield, creted by import (X - Editor == HTML code)
  • 448 - ID of parent's customfield - the new customfield by import will be created as child for this
  • on-import - position for imported customfield - can be used as position for show in template

 

 

Setup - customfield with html

 

 

2. Add domain name for all links in HTML code inside customfields after import (the new customfield has ID 451)

a. manually - got to phpmyadmin and use sql command for add domain name

UPDATE `import_minijoomla_org`.`udf89_virtuemart_product_customfields` SET `customfield_value` = REPLACE(`customfield_value`, 'src="/', 'src="https://thermogatz.gr/') WHERE `virtuemart_custom_id` LIKE '%451%';

b. automatically - create php script and connect to cron, call after every import

Login Form