Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

quantity displayed & text status for some products...


elari

Recommended Posts

No one said you can mate.

 

I'm just letting all those know that hadnt noticed.

 

Otherwise you may have 20 questions fired at you. :wink:

 

Good work tho Elari, great mod. :)

 

CC.

Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

I have all my products set on red "not showing stock" and when I set "display product quantity" to "1" then I am getting the status message "out of stock" on all products no matter what the stock qty are.

Any ideas what can be wrong?

 

I am using a snapshot from first in December.

 

Regards

Mike

Link to comment
Share on other sites

no i think should be made too...

 

but i will rewrite some part of this mod to use a function instaed of having too many time 80% same code to change and keep updated

 

hope to make this next week...

Link to comment
Share on other sites

i have updated products qty to use a function to ease install and update

now the status can be added easilly in any file where you want to display stock

for instance change are in my cvs only

Link to comment
Share on other sites

  • 3 weeks later...
i installed the qty_display_allowed Contribution by elari.

 

Unfortunately this won't allow me to display the Product Availability on the Products_info Page.

 

Can anybody tell me which code i need to use his contribution to show the Product Availiabillity also on the Product_info page ?

 

right i have not installed qty in product info !

 

it depend of which version you have installed

the lastest release use a function to return the status

 

 

tep_get_products_stock_status_display ($product_quantity, $product_quantity_display_allowed, $language_id ='')

 

 

so you have to add something like

in the query add field products_display_allowed

and after define the status by

$lc_text = tep_get_products_stock_status_display ( $product_info_value[..... add all needed values);

 

and when you want to display

echo $lc_text somewhere you want...

 

look in modules/product_listing to see how it work

 

if you use oldest package, update to lastest one.. it is really more simply to install update and maintain

Link to comment
Share on other sites

Please disregard the new topic I started, is there a way to get that deleted.

 

I installed everything on November snapshot using 2m1112, but after installing everything, the admin looks fine, but no page displays any stock. What can I look at to try to find out why the stock is not being displayed. All help is appreciated as this i my last mod to get to work before I go live.

 

I then did the following:

 

tried the newer version and get the same thing. If I try to make any changes to general_elari_qty.php it always gives an error

 

Parse error: parse error, unexpected T_STRING in C:Inetpubxxxxxxxxxincludesfunctionsgeneral_elari_qty.php on line 50

 

what is this line suppose to be?

 

I think I am missing something on the setup, what do I need to do to have the stock displayed, does anything have to be changed.

 

THank You

Link to comment
Share on other sites

for chrysler

I am running a TEP 2.2 Snapshop from 11/23/2002 and could not find the specified function in general.php or product_listing.php.

 

could you please a little bit more specific.

the function is not in general.php it as to be added to general.php

agin read install

5) Add to catalog/functions/general.php . At the end of file just before ?>

Changed 2N0114

include('includes/functions/general_elari_qty.php');

this will add the function

 

you just have to check that the file general_elari_qty.php is in same directory as general.php

 

in the modified /catalog/includes/modules/product_listing you just have to see how the function is called. it is not in the original osc files but in the modifgied file included in the contrib

Link to comment
Share on other sites

for george

please use last release that is posted in my dload area version 2n0123

dload here

 

http://www.unlockgsm.com/dload-osc/pafiled...tion=file&id=20

 

did you set in admin the qty breakout that will allow qty to be displayed ?

did you check with phpmyadmin the content of the table product-stautus ?

maybe the problem is you language id. by default the table includes only standard language id.... and i did not made an admin to define new status. you have to make them with phpmyadmin.

 

If I try to make any changes to general_elari_qty.php it always gives an error

 

Parse error: parse error, unexpected T_STRING in C:Inetpubxxxxxxxxxincludesfunctionsgeneral_elari_qty.php on line 50

 

what is this line suppose to be?

you have no need to change anything in the fuction. they work !

to see what is in line 50, use a text editor to read the file and check line 50 !

 

at this time my line 50 is

if ($product_quantity < PRODUCTS_QUANTITY_BREAKOUT) {

 

maybe you did not set this value in admin - my store - product listing if i make no mistake...

you also have to set the stock force out of stock option (admin - my store - stock)

Link to comment
Share on other sites

I looked at line 50 that is in the .zip file.

 

if ($product_quantity PRODUCTS_QUANTITY_BREAKOUT) {

 

I added the < but then I get the following.

 

Parse error: parse error, unexpected T_STRING in C:Inetpubxxxxxxxincludesfunctionsgeneral_elari_qty.php on line 33684934

 

brakout is set to 3 in admin

I have items that have more than 3 and less than 3.

 

Table product status has 4 items with a language identifier of 1 and status of 0,1,2,3,4

 

I didn't have the out of stock set to 1 but have changed that to no avail.

 

Thank you for your help.

Link to comment
Share on other sites

little more info for line 50

 

break;

case '1':

//Display stock is allowed so we test the breakout qty. you must change operator manually in file

//by default qty will be dispalyed if less than 3 pcs and you can set green status to say something like "buy fast, only 2"

if ($product_quantity < PRODUCTS_QUANTITY_BREAKOUT) {

if ($product_quantity == 0) {

 

thanks

Link to comment
Share on other sites

i don't undestand your problem

i have again check the two avalaible package that use function

 

i have

                    if ($product_quantity < PRODUCTS_QUANTITY_BREAKOUT) {

                      if ($product_quantity == 0) {

                        $stock_status = '<span style="color: #ff0000"> ' . tep_get_products_status_name(0) . '</span> ';

                      } else {

                        // Maybe you will want to display avalaible qty in new_products, so change in the following lines

                        $stock_status = ' ';

                        // $stock_status = '<span style="color: #00c000"> ' . tep_get_products_status_name($products_quantity_display_allowed) . $products_quantity . '</span> ';

 

both include the < while your pakckage does not have it ?????

 

without any url provide i have no idea what is your problem

 

again, overwrite files that are in catalog_add in you catalog

and files in admin_add in your admin

 

then compare other files that are in osc_files with the one you use

 

after that provide an url to check it

Link to comment
Share on other sites

please chaneg this

 

                  case '1':

                    //Display stock is allowed so we test the breakout qty. you must change operator manually in file

                    //by default qty will be dispalyed if less than 3 pcs and you can set green status to say something like "buy fast, only 2"

                    if ($product_quantity < PRODUCTS_QUANTITY_BREAKOUT) {

                      // changed 2n0203 ==0 to <=0 to report negative qty as Out Of stock instead of negative qty...

                      if ($product_quantity <= 0) {

                        $stock_status = '<span style="color: #ff0000"> ' . tep_get_products_status_name(0) . '</span> ';

                      } else {

                        // Maybe you will want to display avalaible qty in new_products, so change in the following lines

                        //$stock_status = ' ';

                        //$stock_status = $product_quantity . '<' . PRODUCTS_QUANTITY_BREAKOUT . ' PQDA=' . $product_quantity_display_allowed ;

                        $stock_status = '<span style="color: #00c000"> ' . tep_get_products_status_name($product_quantity_display_allowed) . $product_quantity . '</span> ';

                      }

                    } else {

//                         $stock_status = $product_quantity . '>' . PRODUCTS_QUANTITY_BREAKOUT ;   // for debug

                        $stock_status = ' ';                      // this is displayed if the condition of breakout is not ok

                    }

                    break;

                  case '2':

Link to comment
Share on other sites

I reinstalled the general_elari file and it is working in some parts. The stock only shows now in the new products table. It does not show anywhere else. Seams dreamweaver was casusing havoc with the general_elari file so I am using notepad now.

 

I tried using the categories.php but I don't have a lot of the features installed to use that one so I am using a previous categories.php file that works fine, is that ok.

 

What should I look at to get the mod to work in other aspects of the site.

 

Thank you for your help once again, I know I am going to be able to get this to work now as it is working partially.

 

Thanks

 

George

Link to comment
Share on other sites

I reinstalled the general_elari file and it is working in some parts

this is only for my own other mods... not used by qty_disp_allowed

you must use general_elari_qty.php for qty

 

Seams dreamweaver was casusing havoc with the general_elari file so I am using notepad now.
try to use Context or phpedit or ...

 

 

I tried using the categories.php but I don't have a lot of the features installed to use that one so I am using a previous categories.php file that works fine, is that ok.

no. you have to check whas has been chnaged to use all feature and to be able to set values. however as you continue to provide very low information i can not help... (which version number? from which package? )

 

 

What should I look at to get the mod to work in other aspects of the site.
check change in others files included in package

except product info the qty are displayed in allmost all page

 

check my demo page to see where it is show or not

Link to comment
Share on other sites

I actually got a lot of it to work. Added to the product_info page, just need to get it working on the default.asp when you click on a category. I will look at the pics again and see if it is showing up now where it was programmed for. Thank you for the info it helped me a lot.

 

It is on a test server that is not accessable, otherwise I would provide a URL.

 

Thank you for your help again.

Link to comment
Share on other sites

I have added the codeto most of the prices on the oscommerce site. The only page it doesn't work on now is in default.asp. THe code is there but nothing appears, When you click on a category and your items are displayed where is the code located for the prices and the respective status.

 

Great mod.

 

THanks

Link to comment
Share on other sites

in deault.php itself there is not so much to change if i remember

only query i think

 

then the work is in the modules /new_prod or products_new ....i don't remember exactly which one :)

 

hope you'll love it :)))

Link to comment
Share on other sites

It is a great mod and works awesome, I have modified the sayings and everything. Everything works excpet on the default page. I wasn't too clear on it I believe. Basically new products, what's new, and even my product details works great. I modded some of those where there was no code.

 

I am having trouble on the product listings. The products are listed when you click a category but the status isn't. I have learned a lot now from the code since starting this project but am having trouble with this las item.

 

My product listing has the picture of the item, not like a list like yours. Could that be why? What should I look at in product)listing to have the status show as the code was there for it but just not showing up.

 

Thanks you have been a great help.!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...