1 Attachment(s)
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
Ajeh
You have the code in the wrong place ... :eek:
Remove the new code that I gave you:
Code:
// 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:
Code:
}
$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:
Code:
}
// 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
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
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
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?
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
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
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
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
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
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
Re: Is it possible to disable buying only in one category?
You should just need to comment out:
Code:
// echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
Ajeh
You should just need to comment out:
Code:
// 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
Re: Is it possible to disable buying only in one category?
What are your currency settings for it?
1 Attachment(s)
Re: Is it possible to disable buying only in one category?
Quote:
Originally Posted by
Ajeh
What are your currency settings for it?
Did you mean this? :
Attachment 12327
thanks
Nandor