Search
Other ReReplacer questions
Forum

Replace custom field in virtuemart

marvays's Avatar marvays
Hi.
I have data from the manufacturer's xml feed. I have an energy sheet in one custom field.
The manufacturer sends me a value like:
<ParamValue>6a4d4459-25b4-4665-9092-c51e676b97de</ParamValue>

When importing, I put this value in a custom field, and in the html code on the page it looks something like this:
<div class="customf" data-mh="customf">	<div class="product-fields clearfix">
<div class="product-field product-field-type-Y">
<div class="product-field-display">6a4d4459-25b4-4665-9092-c51e676b97de</div>
</div>
</div>
</div>

So I need to change the imported value
6a4d4459-25b4-4665-9092-c51e676b97de
to image:
<img src="https://www.tefcold.cz/Admin/Public/GetImage.ashx?Height=40&amp;Crop=5&amp;Image=/Files/Images/Perfion/6a4d4459-25b4-4665-9092-c51e676b97de.png" />

The problem for me is that each product has a different code. Is there any way to solve this so I can change it to an image and not have to do one product at a time?

Unfortunately, I cannot pre-specify this custom field during import.

All codes have the form 8-4-4-4-10 characters. Maybe it could be found somehow using that.
Peter van Westen's Avatar Peter van Westen ADMIN
ReReplacer only replaces stuff in the html output of your site.
So this won't have an effect during import. It does not change the actual values in the database, just the output.

If you want to fix this in the actual database after import, then I recommend you use DB Replacer Pro.

You could use Regular Expressions to replace your number codes to an img HTML code.
How to do this depends a bit on what you want to do (ReReplacer or DB Replacer) and where these codes are...
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription