Ohidul Islam
Forum Replies Created
-
The price calculator plugin stores all values of specific product measurements in a multi-dimensional array in the database. I am not sure what will be the correct way but what if we use PHP to replace such values from the database? I’ve prepared a PHP snippet that works and can be handy for you. Put the below code into the Function editor
function map_length_values($data) { $value = unserialize($data); array_walk_recursive($value, 'replace_values'); return serialize( $value ); } // Replace the values function replace_values(&$element, $index) { // Original values that you want to replace $original_values = [10,20]; // The new values that you want to have instead $new_values = [100, 200]; $element = str_replace($original_values, $new_values, $element); }
Now update the $original_values and $new_values arrays as per your need.
Then pass the price calculate field value through the map_length_values function and it will be something like [map_length_values({_wc_price_calculator[1]})]
Screenshot: https://prnt.sc/s7obi4Kind regards
- This reply was modified 4 years, 7 months ago by Ohidul Islam.
Hi @imperiatus,
Just to know, did you strip out the actual image path? If the images URL has a full and actual image path like the following then it’s easy to import the images.
https://example.com/filepath/0001.jpg|https://example.com/filepath/0002.jpg|https://example.com/filepath/0003.jpg
Then you can tell WP All Import to separate the images with a pipe character “|”. Check the screenshot for more detail: https://prnt.sc/s7llj0
And you can get some more information from the documentation here: https://www.wpallimport.com/documentation/images/overview/
Kind regards,
OhidForum: Fixing WordPress
In reply to: Featured Image wont resizeHi @eryk4381,
I could see the above codes are correct. But you have a plugin called “visual-elements” which have CSS code that is making the images full width.
Screenshot: https://prnt.sc/s4v8geimg.wp-post-image { width: 100%; }
Try removing that CSS code block from this file on line no 240: https://stonesorganics.com/wp-content/plugins/visual-elements/assets/css/custom.css
I tried with width: auto and width: initial but they didn’t override the plugin CSS.
Kind regards,
OhidForum: Fixing WordPress
In reply to: Zip Import for pagesHi @paradiso5
I am not sure how the .zip files were created from the landing pages. If it was created using any exporter plugin or using any page builder then it should have some .XML or .json files that are mostly used for export and import data-related staff.
If the .zip file only contains some PHP, images then I am afraid, it can’t be automatically imported using any imported. Rather you might need to look into the PHP file and check what functionality it contains. Sometimes, placing the PHP file on the root directory on your WordPress installations and opening that file from the browser could run some kind of importer.
Kind regards,
OhidForum: Plugins
In reply to: [One Click Demo Import] Not importing all the pagesHi
Thanks for your reply.
Yes, all pages are exported in the xml file. When I import the same file from Tools -> Import -> WP Importer it imports all the pages.
Then I have came to an solution. I have duplicated those 3 pages. Then exported all the pages. Again tried importing with OCDI with a fresh WP Installed site. Now those duplicated pages has been imported but not that original 3 pages. Weird problem but for now it’s been solved.