Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Second Inventory Amount Rate Topic   * * * * * 1 votes

 

Posted 24 February 2017 - 09:48 PM #1

Hello to everyone, i need to customize my cs cart to control a second amount in products.

For example i want to use the default product amount of cscart for the main warehouse and create a second amount to update the products for my retail store.

Can someone help me how to create the mysql table and how can i put this to tpl files?

 

thanks in advance



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 25 February 2017 - 05:04 AM #2

How are you wanting to control this second quantity?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2256 posts

Posted 25 February 2017 - 10:21 AM #3

I am looking for a trick to do this as well. I was thinking we might be able to copy our main store, open a 2nd storefront, and use that at the retail location. But it's impossible to give storefronts their own inventory amounts - they are always linked.

 

I would also really like to see an arrow or something with which we can move inventory to the other list. 


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 25 February 2017 - 08:09 PM #4

 But it's impossible to give storefronts their own inventory amounts - they are always linked.

Only if the products are shared, correct?

 

An alternative might be to set the different stores up as different suppliers and use the suppliers addon to manage the inventory (haven't looked at it in a long time but think it does this properly).  Advantage is that it also does shipping correctly (different origins) and may also handle taxes properly


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 26 February 2017 - 04:47 PM #5

How are you wanting to control this second quantity?

 

I will upload a XML file direct to sql database, maybe i wiil import the value to a new column in the cscart_product table. I can make the php file to import the values to the cscart_products table, my problem is how to call this value to the tpl file on the storefront.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 26 February 2017 - 10:10 PM #6

If you add a field to the cscart_products table and add a column named 'amount2' you can then alter the 'products' schema (app/schemas/exim/products.php) so you can import/export using CSV.

 

If you want to manipulate it directly in the DB, you can do that too.

 

Once it's in the table, it can be referenced in the template files such as {$product.amount2}


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 28 February 2017 - 02:22 PM #7

If you add a field to the cscart_products table and add a column named 'amount2' you can then alter the 'products' schema (app/schemas/exim/products.php) so you can import/export using CSV.

 

If you want to manipulate it directly in the DB, you can do that too.

 

Once it's in the table, it can be referenced in the template files such as {$product.amount2}

 

Hi, thanks it works but why when i change the value in the amount2 i need to clear the cache so the right text will apear in the storefront. My code to the tpl is     {if $product.amount2 > 0}<div>Available in retail store</div> {else} <div>Unvailable in retail store</div>{/if}   



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 28 February 2017 - 08:32 PM #8

I'm going to guess that it is because you don't have 'amount2' as a retrieved field for the product array on whatever template you are referencing.  Many of the requests for listings only request a subset of the product fields.  Ie.. $product.amount2 is empty and then being used in a compare which makes it equate to zero.  And 0 > 0 is not true.

 

The cache (assuming you mean the registry cache -ie ?cc) is used to store cached values that are assumed to be static and the registry of hooks.  The template cache (?ctpl) is used for caching the actual templates. 

 

My guess is that your $product.amount2 is coming up as empty.

 

Don't have enough info to point you any further....


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2256 posts

Posted 07 March 2017 - 06:57 PM #9

Only if the products are shared, correct?

 

An alternative might be to set the different stores up as different suppliers and use the suppliers addon to manage the inventory (haven't looked at it in a long time but think it does this properly).  Advantage is that it also does shipping correctly (different origins) and may also handle taxes properly

Hmm that's interesting. I never looked into suppliers add-on, since this is something I have never needed. So you're saying it would be possible to have 2 identical stores (product wise) and each store has its own inventory amounts?


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 07 March 2017 - 09:14 PM #10

Like I said, I haven't looked into it in a long time.  But it was implemented to support drop-shipping so I would assume that it manages inventory on a supplier by supplier basis within the addon (but note that how I think something should work does not always coincide with how cs-cart has implemented something).

 

Note also that the suppliers addon was done long before multiple storefronts. Whether it behaves properly in that environment is a question for cs-cart and/or the Suppliers documentation in the knowledge base.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.