Forums / Managing Customers and Orders / Is it possible to disable buying only in one category?

Is it possible to disable buying only in one category?

Views: 5,239

Results 21 to 40 of 52
6 Apr 2013, 8:56 PM
#21
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Is it possible to disable buying only in one category?

Ajeh:

You have the code in the wrong place ... :eek:

Remove the new code that I gave you:

// bof: show room only for master_categories_id 58
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
if (zen_get_products_category_id($product_id) == 58) {
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
}
// eof: show room only for master_categories_id 58

> 
> and go lower in the code and find the code that starts with:
> ```
    }

    $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
    switch (true) {
// cannot be added to the cart

Put it just below the } and above the line starting with $button_check so it reads:

}

// bof: show room only for master_categories_id 58
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
if (zen_get_products_category_id($product_id) == 58) {
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
}
// eof: show room only for master_categories_id 58

$button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
switch (true) {

// cannot be added to the cart



It works!!!!
Thanks!!!

I'd have two more questions regarding this issue :

Attachment 12315

Why does it show this :**Products ID: 133 Master Cat: 58** - How can i make this dissapear or prevent showing this info. in cas of other items later?

In case i'd like to have two or three other categories like this, for showroom only, do i only have to write the other category id's next to this one? Or doe it work differently?

Thanks in advance

Nandor
6 Apr 2013, 9:09 PM
#22
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

It works!!!!
Thanks!!!

I'd have two more questions regarding this issue :

Attachment 12315

Why does it show this :Products ID: 133 Master Cat: 58 - How can i make this dissapear or prevent showing this info. in cas of other items later?

In case i'd like to have two or three other categories like this, for showroom only, do i only have to write the other category id's next to this one? Or doe it work differently?

Thanks in advance

Nandor

**I realized in the meantime that after this modification at all products the Products ID...Master Cat:... are shown,
no prices can be seen at the other products (the ones that should be add this to my cart) and under add to cart the word : details isnt translated when switching to german or hungarian. Unless i am mistaken the "detail" word wasnt even there before.
I dont know what all these three things have to do with this one modification....

thanks

Nandor**

7 Apr 2013, 2:47 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

Did you try going back and comment out the test for the echo to show the products_id and master cat that was just there for testing?

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!

7 Apr 2013, 2:59 PM
#24
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

Did you try going back and comment out the test for the echo to show the products_id and master cat that was just there for testing?

you mean this line (new coding that i pasted):

echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';

without : // or with?

thanks

Nandor

7 Apr 2013, 3:03 PM
#25
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

you mean this line (new coding that i pasted):

echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';

without : // or with?

thanks

Nandor

I did it with //echo...

Products ID...Master Cat:... - dissapeared

Details word still shown in english, in case of all three languages

And the biggest problem is that the prices cant be seen in HUf. Its ok in Euro.

thanks

Nandor

8 Apr 2013, 6:38 PM
#26
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

I did it with //echo...

Products ID...Master Cat:... - dissapeared

Details word still shown in english, in case of all three languages

And the biggest problem is that the prices cant be seen in HUf. Its ok in Euro.

thanks

Nandor

**Hello Ajeh!

Me again. I put back the original functions_general.php and the HUF prices still dont show.
Then i put back the modified functions_general.php again and of course the HUF prices still cant be seen. (or prices in Hungarian language)
HAve no idea what could have happened.

thanks

Nandor**

8 Apr 2013, 8:40 PM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

You should just need to comment out:

[B]//[/B] echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';

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!

9 Apr 2013, 4:03 AM
#28
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

You should just need to comment out:

[B]//[/B] echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';




**If it looks like this :
**
     }
	  
// bof: show room only for master_categories_id 58
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
  if (zen_get_products_category_id($product_id) == 58) {
    return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
  }

no prices in HUF and this is displayed at categories and products :Products ID: 127 Master Cat: 53
Products ID: 128 Master Cat: 53 Products ID: 133 Master Cat: 58...etc

**if it looks like this :**

   }
	  
// bof: show room only for master_categories_id 58
//echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
  if (zen_get_products_category_id($product_id) == 58) {
    return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
  }

no prices displayed in HUF either, these dissapear : :Products ID: 127 Master Cat: 53
Products ID: 128 Master Cat: 53 Products ID: 133 Master Cat: 58...etc

I suppose the HUF prices problem occured at the same time when i did the functions_general.php rewrite, because didnt do anything else at that time.
Dou you have any suggestion what this could be?

thanks

Nandor
9 Apr 2013, 1:03 PM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

What are your currency settings for 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!

9 Apr 2013, 1:42 PM
#30
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

What are your currency settings for it?

Did you mean this? :

Attachment 12327

thanks

Nandor

9 Apr 2013, 2:17 PM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

Could you test by adding a new currency:

Title: Euro
Code: EUR

Symbol Left: €
Symbol Right:

Decimal Point: .
Thousands Point: ,
Decimal Places: 2

Last Updated: 01/11/2013
Value: 0.77300000

and after you Insert it, post what you see in the right hand column for 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!

9 Apr 2013, 2:23 PM
#32
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

Could you test by adding a new currency:

and after you Insert it, post what you see in the right hand column for it ...

I already have euro. Is it good if i use the same settings(you wrote) with usd?

9 Apr 2013, 2:28 PM
#33
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

For USD use:

Title: US Dollar
Code: USD

Symbol Left: $
Symbol Right:

Decimal Point: .
Thousands Point: ,
Decimal Places: 2

Value: 1.36919999

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!

9 Apr 2013, 2:36 PM
#34
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

I already have euro. Is it good if i use the same settings(you wrote) with usd?

I inserted usd. It works. I mean i see the currency. So i see euro, usd but not the forint.

Attachment 12328

Attachment 12329

Attachment 12330

thanks

Nandor

9 Apr 2013, 2:38 PM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

Can you insert another currency called:
Fred

with the same settings that you are using on your broken currency?

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!

9 Apr 2013, 2:50 PM
#36
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

Can you insert another currency called:
Fred

with the same settings that you are using on your broken currency?

Inserted Fred with HUF currency settings (broken one) doesnt display either

Attachment 12331

9 Apr 2013, 2:55 PM
#37
ajeh avatar

ajeh

Oba-san

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

Re: Is it possible to disable buying only in one category?

Can you edit the broken currency and enter in the Decimal Places: 0 if you want no decimal places ...

See if it suddenly starts working ...

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!

9 Apr 2013, 2:59 PM
#38
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Ajeh:

Can you edit the broken currency and enter in the Decimal Places: 0 if you want no decimal places ...

See if it suddenly starts working ...

It suddenly started working!!!!! Thanks!!!!!!

Dont know why this happened.....surely i did something, because it wouldnt happen because of rewriting the php file, would it?

Nandor

9 Apr 2013, 3:00 PM
#39
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

It suddenly started working!!!!! Thanks!!!!!!

Dont know why this happened.....surely i did something, because it wouldnt happen because of rewriting the php file, would it?

Nandor

Dont you happen to know where to modify this "detail" word? I thought i already translated everything....

thanks

Nandor

9 Apr 2013, 3:10 PM
#40
nandor avatar

nandor

Zen Follower

Join Date:
Sep 2012
Posts:
104
Plugin Contributions:
0

Re: Is it possible to disable buying only in one category?

Nandor:

Dont you happen to know where to modify this "detail" word? I thought i already translated everything....

thanks

Nandor

One last question regarding this problem : if i want another one or two master categories only for showcase how do i rewrite the particular line in the php file?

thanks nandor