Re: Google Merchant Center Feeder for ZC v1.5.x
Hi
I have just set up our product pages to include prices both inclusive and exclusive of VAT . Look at https://shaftdirect.com/the-manual-a...lfh5nm9vvbtt23 as an example.
However now all our prices on Google feed are showing the prices excluding VAT. How can I change this to include the price including VAT?
The other plugin I used was https://www.zen-cart.com/downloads.php?do=file&id=597 to display both prices.
Please, I welcome any help.
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
dharrison
from the googlefroogle.php script:
Code:
$tax_rate = zen_get_tax_rate($products->fields['products_tax_class_id']);
// the following will only add the tax if DISPLAY_PRICE_WITH_TAX is set to true in the Zen Cart admin
$price = zen_add_tax($price, $tax_rate);
what is DISPLAY_PRICE_WITH_TAX set to? that looks to be the reason why.... not sure how that would affect other displays on your store.
best.
Re: Google Merchant Center Feeder for ZC v1.5.x
Hi Carl.
Thanks for your reply. The display price with tax is set to inc/ex which is a feature available on the plugin that I linked to.
I tried the other option of ex/inc, and this made no difference to the price.
I hope this helps.
Re: Google Merchant Center Feeder for ZC v1.5.x
debbie,
i do not see how this should affect it....
do you have MAP PRICING enabled?
you can try commenting out that line, and see if that changes things, but i don't think that it will...
Code:
//from:
$price = zen_add_tax($price, $tax_rate);
//to:
//$price = zen_add_tax($price, $tax_rate);
you can also try adding an echo statement just above the tax rate to see if the price that we start off with has the VAT or not:
Code:
echo $products->fields['products_id'] . '------->' . $price . '<br />';
$tax_rate = zen_get_tax_rate($products->fields['products_tax_class_id']);
when you execute the script you will then see prices and we can find out if it is starting off correct.
good luck!
Re: Google Merchant Center Feeder for ZC v1.5.x
Hi Carl
Using either method of inc/ex or ex/inc, all prices are showing up as ex VAT
I do not have map pricing enabled however I do use Dynamic price updater as the price varies depending on size, quantity and additional fittings (eg castor wheels)
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
carlwhat
debbie,
you can try commenting out that line, and see if that changes things, but i don't think that it will...
Code:
//from:
$price = zen_add_tax($price, $tax_rate);
//to:
//$price = zen_add_tax($price, $tax_rate);
Hi Carl
I also tried this and you are correct, it made no difference.
Re: Google Merchant Center Feeder for ZC v1.5.x
Hi Carl
I have tested again this morning and tested each product tax option. The only time the product feeds include vat is when I select that option under My Store. Every other option shows the prices excluding VAT.
Please, I welcome any help. Even if it involves editing google-base.php
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
dharrison
Hi Carl
I have tested again this morning and tested each product tax option. The only time the product feeds include vat is when I select that option under My Store. Every other option shows the prices excluding VAT.
Please, I welcome any help. Even if it involves editing google-base.php
debbie,
my apologies.... i'm really unfamiliar with this plugin and when looking at it, i'm starting at ground 0; and i have limited time in my day. and i do not have a working test ZC install that i can play around with this plugin. so i'm working blind... sort of...
in addition, apparently i read your initial post incorrectly. which is why i was having so much trouble to start off with! you want the price to include VAT, and it is showing up as without VAT. i thought the other way around.... now it makes more sense what i was seeing with regards to the code!
in the same googlefroogle.php script, lets try this:
Code:
//from:
$price = zen_add_tax($price, $tax_rate);
//to:
$price += zen_calculate_tax($price, $tax_rate);
please let me know if that works.
Re: Google Merchant Center Feeder for ZC v1.5.x
It works!!! :clap::clap:
Thank you so much Carl. :smile:
Re: Google Merchant Center Feeder for ZC v1.5.x
1.5.5f on php 7.1.15. I replaced the split functions in the google_base.php class. I can export less than a specified number of products but if I just try to export all, it appears that it actually exports inactive products as well as active products and quits at close to 3000 products - About the same place each time. No error logs in the log folder, error on the screen is WARNING: An Error occurred, please refresh the page and try again. I have to assume that php 7 is causing this but know of no other changes that need doing beside the split function.
If I limit to one category, it completely works and ends with an accurate count of active products. It's really quite fast and isn't hanging up so doesn't seem to be a server limit on execution time or memory. Any one got an idea what could be happening? I've worked with this a lot in the past so I'm a bit frustrated that I don't see the problem.