Is there a way on Zen Cart to add a parameter to each item (or within
the MySQL) so that the Google Checkout is disabled if that product is
in the shopping cart?
This should satisfy the requirements Google are asking me to fulfill.
What we need to do is place the Google-hosted 'not available' button
for categories/products
that are restricted under Googles policies. Please note that my PHP
knowledge is very limited but maybe I'm on the rite track. With a
little help this could be solved or not?
What I have learned.
1.) By replacing 'XXX' with our Google merchant ID in the URL below,
the Google-hosted 'not available' button will display in my browser.
http://checkout.google.com/buttons/checkout.gif?merchant_id=XXX&w=180...
tyle=white&variant=disabled&loc=en_US
2.) The code below is on line 287 in file gcheckout.php. Maybe
something similar to this code example could be used except with
the restricted master_categories_id or product_id and placed in
gcheckout.php
somewhere? Ive tried to do this but with no success.
if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($flagAnyOutOfStock ==
true) ) {
$Gcart->SetButtonVariant(false);
$Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_OUT_OF_STOCK;
}
Thanks
Tom
On Aug 15, 10:21 am, Ropu <rovagn...@gmail.com> wrote:
> Hi, right now there is no possibility for that.
>
> but u may add some code to the googlecheckout/gcheckout.php
> between lines 126 and 215 the items in the ZC cart are added to the GC one.
> There u should have all the necessary info about the items. So u can check
> if they belong to a particular category and gray the button with this code
>
> $Gcart->SetButtonVariant(false);
> $Gwarnings[] = "Some products in the cart are not available with GC, etc";
>
> Hope this helps
>
> ropu
Tom
On Aug 23, 5:18 pm, Ropu <rovagn...@gmail.com> wrote:
> A quick fix may be this one.
>
> in file googlecheckout/gcheckout.php line 215
>
> replace:
>
> $product_list .= ";".(int)$products[$i]['id'];
>
> with:
>
> $product_list .= ";".(int)$products[$i]['id'];
> if(in_array($products[$i]['category'], $resticted_categories)) {
> $Gcart->SetButtonVariant(false);
> $Gwarnings[] = 'Some items are in restricted category...';
> }
>
> and in line 125
>
> replace:
>
> $look4Attr = array('TEXT');
>
> with:
>
> $look4Attr = array('TEXT');
> // Restricted categories
> $resticted_categories = array(9,12,32);
>
> where 9,12,32 are the ids of the restricted categories.
>
> Just note that GC Policy says that 95% of the time, the GC button MUST be
> enabledhttp://checkout.google.com/support/sell/bin/answer.py?answer=46174&to...