Ya, "split" has been deprecated since PHP 5.3 ... Is your plugin code safe to use on PHP 5.3?
Printable View
Ya, "split" has been deprecated since PHP 5.3 ... Is your plugin code safe to use on PHP 5.3?
I am using version 1.14.3 on Zen Cart 1.5.4. All works perfectly but the problem I have is that the weight options are either kilograms or pounds. All my products and postage options are using grams. So a product weighing 350g is exported to Google as 350kg. Up until now, in the merchant centre, I have my postage as 1 - 2000kg as this shows the correct postage price. However, Google are now beginning to flag a few products as "Attribute Shipping Weight is too high". No problem at the moment but they may turn from yellow to red! Is there a way to adjust the coding to allow for grams?
Thanks.
The easiest way is to use an SQL query to reduce all the product weights in the database to one thousandth of the current value. No code changes required!
But it's only the product feed that is exporting as kg. The actual product are grams which is correct.
No, grammes is incorrect. That's the point. Convert to the correct units and the problem is solved!
Recently having trouble no matter what I do can't get it to work. Have tried everything. Any ideas. Have replaced split with explode, etc. Any point in right direction would help tremendously.
[19-Jul-2017 11:13:08 America/Chicago] Request URI: /googlefroogle.php?feed=fy_un_tp&limit=&offset=&x=27&y=13&key=e5221e8b4d, IP address: 24.34.85.238
#1 trigger_error() called at [/home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/home1/thedrah1/public_html/includes/classes/google_base.php:832]
#5 google_base->google_get_products_special_price() called at [/home1/thedrah1/public_html/includes/classes/google_base.php:732]
#6 google_base->google_get_products_actual_price() called at [/home1/thedrah1/public_html/googlefroogle.php:187]
[19-Jul-2017 11:13:08 America/Chicago] PHP Fatal error: 2008:MySQL client ran out of memory :: select sale_specials_condition, sale_deduction_value, sale_deduction_type from zen_salemaker_sales where sale_categories_all like '%,55374,%' and sale_status = '1' and (sale_date_start <= now() or sale_date_start = '0001-01-01') and (sale_date_end >= now() or sale_date_end = '0001-01-01') and (sale_pricerange_from <= '15.9500' or sale_pricerange_from = '0') and (sale_pricerange_to >= '15.9500' or sale_pricerange_to = '0') ==> (as called by) /home1/thedrah1/public_html/includes/classes/google_base.php on line 832 <== in /home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php on line 167
[19-Jul-2017 11:13:08 America/Chicago] PHP Fatal error: 2013:Lost connection to MySQL server during query :: select count(*) as total
from zen_sessions
where sesskey = '12nr8fs56t10n65l5huq3ge5u1' ==> (as called by) /home1/thedrah1/public_html/includes/functions/sessions.php on line 66 <== in /home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php on line 167
Thanks
Sandria
admin -> tools -> developers tool kit -> Search in Configuration Settings/Keys
type:
memory
press search.
edit:
GOOGLE_PRODUCTS_MEMORY_LIMIT
increase from 128M to 256M
run script again.
best.
I just recently upgraded to 1.5.5e fresh install and added Merchant Center Feeder 1.14.5.
I immediately encountered a problem with Google reporting the following two errors:
"Unsupported currency in attribute: price" and "Missing required attribute: price"
On inspection of the xml output file, I found the following elements (as example) in each item:
Then checking Google's help on the product data attributes for price: https://support.google.com/merchants/answer/6324371Code:<g:price>8.80</g:price>
<g:currency>USD</g:currency>
I came to the conclusion that it looks like for xml, that the currency should really be included within the price attribute.
I made the following changes to resolve it at line 380 and line 431 in googlefroogle.php :
line 380 changed from:
to:PHP Code:
$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '')));
andPHP Code:
$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '') . ' ' . GOOGLE_PRODUCTS_CURRENCY));
line 431 change from
to:PHP Code:
$shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate));
And I made changes similarly at lines 302 and 350 in google_base.php.PHP Code:
$shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));
I also ended up setting "Show Default Currency" to false in the Google Merchant Center Feed configuration to turn off the <g:currency> field that doesn't seem to be parsing anyway (but it also eliminated the ¤cy=USD from the URL which is unnecessary on our site, that may not be the case for others.)
In case anyone ran into the same thing, that seems to have taken care of the issue for me.
Unfortunately still having trouble getting a feed. Have tried to inc memory etc. [26-Jul-2017 14:14:13 America/Chicago] PHP Fatal error: Uncaught TypeError: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /home1/thedrah1/public_html/includes/classes/google_base.php:389
Stack trace:
#0 /home1/thedrah1/public_html/includes/classes/google_base.php(389): DOMNode->appendChild(false)
#1 /home1/thedrah1/public_html/googlefroogle.php(500): google_base->universal_attributes(Object(queryFactoryResult), Object(DOMElement), Object(DOMDocument))
#2 {main}
thrown in /home1/thedrah1/public_html/includes/classes/google_base.php on line 389
[26-Jul-2017 14:14:13 America/Chicago] PHP Warning: preg_replace(): Compilation failed: failed to get memory at offset 35 in /home1/thedrah1/public_html/includes/extra_configures/enable_error_logging.php on line 29
[26-Jul-2017 14:14:13 America/Chicago] Request URI: /googlefroogle.php?feed=fy_un_tp&limit=&offset=&x=51&y=2&key=1ea3bb8da8, IP address: 24.34.85.238
[26-Jul-2017 14:14:13 America/Chicago] PHP Fatal error: 2008:MySQL client ran out of memory :: select count(*) as total
from zen_sessions
where sesskey = 'c2oqru0ej8d5f7338vlpmvmai5' ==> (as called by) /home1/thedrah1/public_html/includes/functions/sessions.php on line 66 <== in /home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php on line 167
Thanks
Sandria
[26-Jul-2017 14:38:47 America/Chicago] PHP Fatal error: Out of memory (allocated 29622272) (tried to allocate 32768 bytes) in /home1/thedrah1/public_html/includes/classes/class.base.php(137) : runtime-created function on line 1
And this one too.
Thanks
Sandria