Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Coupon Restriction by Manufacturer

Coupon Restriction by Manufacturer

Views: 29,813

Results 41 to 47 of 47
31 Mar 2015, 9:39 PM
#41
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Coupon Restriction by Manufacturer

I have customized the ot_coupon.php in order to get all I want.
When go on restriction coupon page I can't see any button to allow all hundreds of products for my manufacturer. Please tell me I don't have to manually allow them one by one :blink:..

1 Apr 2015, 12:38 AM
#42
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Restriction by Manufacturer

You do not see in the dropdown an:
Add All Manufactures Products

if selected and you click Allow, it will add all of the Products for that Manufacturer ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Apr 2015, 8:34 AM
#43
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Coupon Restriction by Manufacturer

At the bottom page I did :

Selected the Manufacturer name ( from dropdown )
Add all manufacturer products ( from dropdown )
Allow ( from dropdown )
I pressed the "Update" button

At the top of the page I can see the message : "Category Not Completed" and nothing changed .

Any idea ?

1 Apr 2015, 2:44 PM
#44
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Restriction by Manufacturer

In your Zen Cart Admin, go to the Coupon and check for its coupon_id ...

Next, in phpMyAdmin, look at the table:
coupon_restrict

If you search that table for your Coupon based on the coupon_id, do any records come up?

You mentioned you had a lot of Products for this manufacturer, about how many would you think you have?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Apr 2015, 3:46 PM
#45
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Coupon Restriction by Manufacturer

Linda, your persuasive way to help solved my issue.
It works but first i had to "Remove all manufacturer products" for that manufacturer and then "Add all manufacturer products" using selected "Allow" option from dropdown. I believe bulk "update" button isn't working. It's about 360 products available on coupon_restrict table by my coupon_id .

Your help is really appreciated

1 Apr 2015, 4:11 PM
#46
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Restriction by Manufacturer

The remove will clear out all of the products for a manufacturer and perhaps that cleaned things up so you could add them all ...

I cannot really trigger that error message and have tested it where a few products of the manufacturer are already added and then I run the add all for the manufacturer ...

'tis a mystery ... :lookaroun

Do let us know if it happens again that you see the error message, and hopefully you will recall if anything odd happened to produce it ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Feb 2018, 7:35 PM
#47
trigi avatar

trigi

New Zenner

Join Date:
Dec 2008
Location:
sLOVEnia
Posts:
18
Plugin Contributions:
0

Re: Coupon Restriction by Manufacturer

jsarwar:

I tried adding prefix but still same thing. Just to make sure where should I add prefix in following lines:

if ($_GET['build_man'] > 0 && $_POST['products_drop'] == -1) {
// to insert new products from a given manufacturers_id for a coupon_code that are not already in the table
// products in the table from the manufacturers_id are skipped
$new_products_query = "select products_id from products where manufacturers_id = '" . $_GET['build_man'] . "' and products_id not in (select product_id from coupon_restrict where coupon_id = '" . $_GET['cid'] . "')";
$new_products = $db->Execute($new_products_query);
}

      if ($_GET['build_man'] > 0 && $_POST['products_drop'] == -2) {
      // to delete existing products from a given manufacturers_id for a coupon_code that are already in the table
      // products in the table from the manufacturers_id are skipped
        $new_products_query = "select products_id from products where manufacturers_id = '" . $_GET['build_man'] . "' and products_id in (select product_id from coupon_restrict where coupon_restrict = '" . $status . "' and coupon_id = '" . $_GET['cid'] . "')";
        $new_products = $db->Execute($new_products_query);

Thank you Ajeh! 

Works like a charm with this fix.