Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    38
    Plugin Contributions
    0

    Default Multiple Locations - QTY Field Location

    Hello,

    I've searched and researched until blue in the face over the past few weeks, to find one snippet of code.

    I need to figure out where exactly in the code is pulled the values for products_quantity.

    Here's the issue:

    I have two stores and I've been trying to modify my installation like I've done so many times in the past. In this case, I created another entry in the table zen_products - in this case products_quantity_marketplace

    I've created the entry, I've modified the admin side to allow for input of numbers into the database so I know that store 1 has xx qty (indicated in products_quantity) and store 2 has xx qty (indicated in products_quantity_marketplace).

    Now, the problem is, I need the website to pull up the correct qty dependent on which store a user is looking at.

    I've searched everywhere and the closest I can find is from this module: tpl_modules_products_all_listing

    I've looked in here assuming this is the module that writes all the html for the main pages. My customers would search the website, and if at the sub-domain for store #2, it would show those items in-stock for that store. If searching store #1, the www sub-domain, it shows the items in-stock for that store.

    If anyone can offer any insight as to where the system pulls the qty out to display if it's in-stock or not, I'd greatly appreciate it. I need to have this done in time for our black Friday sale.

    Many thanks in advance!

    Jake

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Multiple Locations - QTY Field Location

    Never mind, answered a different question.

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,691
    Plugin Contributions
    9

    Default Re: Multiple Locations - QTY Field Location

    jake,
    adding a new inventory bucket, as one might imagine, offers a plethora of opportunities for complications.

    in the sites i have done, i never show the inventory levels to the customer, so i'm a bit unclear as to your specific question.

    that said, i think you will need to dig deeper than just the template level. includes/classes/order.php is where stock looks to get decremented. so you will need some modification there.

    while not specifically familiar with the differences in V139; there may be multiple places where a customer can add to the cart. each one of the places would also need to get modified. for the template file you listed above, the sql statement that pulls out the inventory quantity i believe is located here:

    includes/modules/pages/products_all/main_template_vars.php

    you probably want to look here as well:

    includes/modules/pages/product_info/main_template_vars.php

    for the product info page.

    hope that gives you a few places to look around and start poking. you will need to add your new field to the sql statements that reference products_quantity (from the TABLE_PRODUCTS), and then based on your sub-domain logic, show/use one field or the other.

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Multiple Locations - QTY Field Location

    A lot of the "lookup" functions are found in includes/functions/functions_lookup.php. There are also applicable functions in the same folder with filename functions_general.php or just general.php.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 1
    Last Post: 27 Mar 2016, 06:29 AM
  2. v152 Multiple Locations?
    By Peter M Dodge in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Jan 2014, 03:01 PM
  3. Multiple store locations
    By sarahlou in forum General Questions
    Replies: 0
    Last Post: 26 Sep 2008, 03:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR