SalvisB
Forum Replies Created
-
The same here. Installed plugin, saved settings, but site map doesn’t appear in my root directory.
But there is file called sitemap.backup.xml…?Think I found working solution by modifying code from link that you provided.
<?php $db_server = '' ; $db_username = '' ; $db_password = '' ; $db_databasename = '' ; $link = mysql_connect($db_server, $db_username, $db_password); mysql_select_db($db_databasename); $qry = "SELECT post_id, meta_value FROM <code>wp_postmeta</code> where meta_key = 'mp_price' and post_id in (select id from wp_posts where post_type = 'product')"; $result = mysql_query($qry) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $val = $row['meta_value']; $string_lenght = strlen($val); $string_lenght = $string_lenght -11; $chars_start = substr($val, 0, - $string_lenght ); $chars_end = substr($val, -2); $price = substr($val, 11, -2); $price = round($price, 2); //echo $val . "<br/>"; //echo $price . "<br/>"; //echo $chars_start . $price . $chars_end . "<br/>"; $updated_price = $price / 0.702804; $updated_price = round($updated_price, 2); $update = $chars_start . $updated_price . $chars_end; //echo $update . "<br/>"; $query = "UPDATE <code>wp_postmeta</code> SET meta_value = '$update' WHERE post_id = '".$row['post_id']."' and meta_key = 'mp_sale_price' "; echo $query . "<br/>"; $result2 = mysql_query($query) or die(mysql_error()); } mysql_close($link); ?>
As far as I tested it works like it should.
Thanks a lot!But I’am still curious, for what purpose are used a:1:{i:0;d:? They appear the same on every entry. After d follows price, but what about letters “a” and “i”?
For what purpose is those characters used in the price field (example at the beginning: a:1:{i:0;d: , at the end: ;}) ?
If, by updating prices, I lose them, what would happen?I can’t understand how first solution could help?
I have 1400 products in one store and about the same amount in two other.
How could I by search and replace method change all of my prices at the same time? Almost each price are different.
I tried second solution.
This line of code:
$price = $price + 1; //Change the 1 to whatever you want to increment the price by
I changed to:
$price = $price / 0.702804 ; //Change the 1 to whatever you want to increment the price by
All prices turned into 0.
Could you help write such a script? I`m weak in programming. The thing is that I must update all prices and sale prices by dividing them by appropriate exchange rate.
It would be an easy task if meta_value column would contain only the price without any additional information. In that case I could write simple SQL query.Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewHi Ash!
By using your code it outputs necessary categories like it should, but there is a few gaps:
1) Categories are displayed as a plain text, not as a links like it should be.
2) It misses styling.
3) Comma ‘,’ are placed after last category aswell, as it shouldn’t be.I can correct styling issue, but don’t know how to correct point 1 and 2.
With best wishes,
SalvisForum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewHi Jack!
Still nothing. ??
Now it’s even worse. By adding that line of code it removes everything else excpet information about product and it’s image, but still without category listing.Before:
https://screencast.com/t/zioU6cym3RxAfter adding that code:
https://screencast.com/t/0qOLm8nl4Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewScreenshot: https://screencast.com/t/VbgURAGexuJD
Closer, but still with mistakes (outputs unnecessary information) and without styling. ;/Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewIt doesn’t work. The thing what it does – it just echo’s string of “Array”.
Screenshot: https://screencast.com/t/HkZLG5b57GTForum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewThanks, Jack.
I will try it out and let you know how it did..Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewThanks Mike! Code for displaying product image works great! ?? But I still can’t find right function to allow display categories in the bottom of product.
Function mp_list_categories displays all the product category tree (as in sitemap), but I need only those categories where the product is placed (as in screenshot which I provided – https://screencast.com/t/cA72q2r5j0.Any ideas?
Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Single product viewIt’s much easier than I think it would be. ??
Only a few problems… 1) Don’t know how to display hierarchy of categories where product is placed.
Screenshot shows what I mean by that: https://screencast.com/t/cA72q2r5j0 (can’t display this section on my mp_product page).
As far as I know for this section responsible is function
<?php mp_category_list(); ?> , but it displays nothing. Maybe I just need to pass some parameters in this function?
2) Another problem is that when I use function <?php mp_product_image(); ?> for image width and height it takes parameters from ‘thumbnail size’ both for ‘single product image settings’ and ‘product list image settings’. When I switch single image settings to display medium or custom size images, nothing happens.Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Customizing Marketpress checkout processYes, I’m using “All in one SEO pack”, it is because of this plugin. When I remove it titles works fine. Is there any solutions to continue to use this plugin but also to fix that bug?
2) I don’t get checkout page headings like “SHIPPING INFORMATION”, “PAYMENT INFORMATION” etc.
Here I think is not a fault of a SEO plugin. There must be something to do with code that I implemented.
I’m speaking about this headings (https://screencast.com/t/MfjVbRD1LEGf) which in each checkout step says – SHOPPING CART or SHIPPING INFORMATION or PAYMENT INFORMATION. I don’t get this output in my development envoirment when I use mp_cart.php file. Shopping cart info. shows up and works fine, but it is outputting without headings.Forum: Plugins
In reply to: [MarketPress - WordPress eCommerce] Customizing Marketpress checkout processHi Jack!
Got your idea about custom css in mp_cart.php file. Now I managed to hide unnecessary widgets in checkout pages.
But still there are some details to figure out –1) Something is wrong with page title in checkout process. In my browser tab it shows some random title from my posts.
2) I don’t get checkout page headings like “SHIPPING INFORMATION”, “PAYMENT INFORMATION” etc.
3) Any ideas how to remove the gap in red (https://screencast.com/t/5fw5LIWa10Jn)Website: https://development.e-rotas.lv
Code which I’m using in my mp_cart.php file right now:
<style> #sidebar-b{ display:none; } #innerbottom{ display:none; } #bottom-b{ display:none; } #bottom-a{ display:none; } </style> <?php /* Template Name: Marketpress Cart */ get_header(); ?> <div id="main"> <?php mp_show_cart('checkout'); ?> </div> <?php get_footer(); ?>