Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can I get stock level from my another site?


Jari646

Recommended Posts

Hi,

 

I have two websites and they are located in different servers. One site is for normal customer and other site is meant for resellers (The normal site is the site where stock level is right). Resellers can see stock level when they log in. How can I get stock level from my normal site to reseller site? I don t mean that it should update my stock level, just to get level so the reseller can read how much is the stock level.

 

The sites have different product id so I have trying to make some kind of code to get right level to show up.

 

This is part of the code I'm have made to my normal site. This is what I try to do --> If reseller is watching dvd385 product (id=28) (reseller page) he / she can see normal site dvd385 (id=40) stock level.

 

How can I get right product id date to my reseller page ? :blush:

 

<?php

if ($products_id == "28"){
function dvd385 ()
{
$products_id = "40";
$prod_quantity = tep_get_products_stock($products_id);
 print "Varastossa:?";// Varastossa = Stock
 echo $prod_quantity;
 print "kpl<br>";// kpl = piece
}
dvd385 ();
}
else

if ($products_id == "41"){
function dvd383 ()
{
$products_id = "96";
$prod_quantity = tep_get_products_stock($products_id);
 print "Varastossa:?";
 echo $prod_quantity;
 print "kpl<br>";
}

dvd383 ();
} 
else

if ($products_id == "40"){
function dvd389 ()
{
$products_id = "98";
$prod_quantity = tep_get_products_stock($products_id);
 print "Varastossa:?";
 echo $prod_quantity;
 print "kpl<br>";
}

dvd398 ();
} 
else

echo "Stock level ???"

 

Have I done all wrong? Please help me :)

Link to comment
Share on other sites

This is probably not the answer you are looking for but have you considered using B2Bsuite which will allow you to have one site and groups such as normal client, reseller, wholeseller each group can be assigne dthere own price list which they see when they log in.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

This is probably not the answer you are looking for but have you considered using B2Bsuite which will allow you to have one site and groups such as normal client, reseller, wholeseller each group can be assigne dthere own price list which they see when they log in.

 

Thank s :D

 

But you are correct that was not what I was looking for. I m all ready use SPPC for my reseller site. The reseller site is one brand (www address is the same as the brand) site and normal site I sell all different brands.

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...