If this is your first visit, check our documentation. To post, register or login.

Exclude manufacturer from sales

Started by anglerscorner on 7 Aug 2015, 2:21 PM · Views: 4,525

Results 1 to 7 of 7
7 Aug 2015, 2:21 PM
#1
anglerscorner avatar

anglerscorner

New Zenner

Join Date:
Jan 2015
Location:
United Kingdom
Posts:
30
Plugin Contributions:
0

Post #1 by anglerscorner

Hi all,

I am just wondering is it all possible to exclude specific manufacturers from 'Salemaker'? ...we have a select few manufacturers who are very fussy about us discounting their products in any way. The website in question is on Zencart version 1.5.4

I know you can apply 'Specials' to individual products but the website I need this for has thousands of products :blink: ...re-categorising all the products or going through them all individually would take forever... and I am not well versed in MySQL.

I have looked to see if there are any modules that do it but didn't see anything. (Sorry if I have overlooked something obvious).

Can anybody recommend anything that would allow me to do something like this? ...hopefully without having to go through each product.

If there is nothing else, please let me know though so I don't end up chasing my own tail.

Thanks in advance :smile:

7 Aug 2015, 11:17 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

is it all possible to exclude specific manufacturers from 'Salemaker'?
How are the products for these mfg's arranged?
Are they by Mfg??

Zen-Venom Get Bitten

8 Aug 2015, 4:13 PM
#3
ajeh avatar

ajeh

Oba-san

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

Post #3 by ajeh

To prevent a manufacturers_id from using SaleMaker prices, you could try the code in RED:
/includes/functions/function_prices.php

function zen_get_products_special_price($product_id, $specials_price_only=false) {
global $db;
$product = $db->Execute("select products_price, products_model, products_priced_by_attribute, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
**if ($specials_price_only == false && $product->fields['manufacturers_id'] == 10) {
return false;
}
**
if ($product->RecordCount() > 0) {

NOTE: I have not tested this on everything, but you can try it and test it everywhere ...

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!

10 Aug 2015, 8:39 AM
#4
anglerscorner avatar

anglerscorner

New Zenner

Join Date:
Jan 2015
Location:
United Kingdom
Posts:
30
Plugin Contributions:
0

Post #4 by anglerscorner

All of the products are currently categorised under fishing type and then by the sub-type of products in question.

For example:

Carp Fishing / Bivvies and Shelters
Fly Fishing / Fly Tackle
Sea Fishing / Sea Luggage

...and so forth.

I believe we some somewhere in the range 6-7 thousand small products on the site so re-categorising them all would be a nightmare.

Thank you Ajeh for that line of code, I will try that out in my test environment as see how it goes. If it works that will be amazing! ...One quick question however, we may have additional manufacturers that would also need to excluded. How might I exclude multiple manufacturers?

Thanks so much for your help :)

10 Aug 2015, 12:46 PM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

You could use:

[B]if ($specials_price_only == false && ($product->fields['manufacturers_id'] == 10 || [B]$product->fields['manufacturers_id'] == 12)[/B]) {[/B]

Just add the manufacturers_id for each that should not allow SaleMaker ...

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!

10 Aug 2015, 2:19 PM
#6
anglerscorner avatar

anglerscorner

New Zenner

Join Date:
Jan 2015
Location:
United Kingdom
Posts:
30
Plugin Contributions:
0

Post #6 by anglerscorner

I tried it on my Xampp local version of the site and it seems to work fine. I'm in the process of making those changes to the live site now, Thank you very much for all your help :D

10 Aug 2015, 2:25 PM
#7
ajeh avatar

ajeh

Oba-san

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

Post #7 by ajeh

You are most welcome ... thanks for the update that this worked for you ... :smile:

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!