Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2016
    Minneapolis, MN
    Plugin Contributions

    help question Distributor Global Price Change

    Ok...I'm running PHP 5.6 and MySQL 5.5.49-0+deb7u1.

    We are a wholesale company and allow some of our customers to become distributors.
    When I add new products to our site it does automatically update our client sites BUT the price does NOT reflect their Retail pricing. Is the value they use for Global Price change able to be stored so I can amend the SQL call to apply that to new products coming over?

    I would prefer to not have to update all my client sites prices when I add new products.
    I've asked the guy who created the site about add-ons or plugins and he says we only have the shipping and order mods.

    Here is the piece of code that updates our client sites off of our DB:
    PHP Code:
    /* -MDC bof update products table with ***** values if not done in last 12 hours */
    $sql_date $db->Execute("SELECT products_last_modified FROM " TABLE_PRODUCTS " WHERE 1 ORDER BY RAND() LIMIT 1;");
    $date strtotime($sql_date->fields['products_last_modified']);
    $date 43200) < time())
    $update_sql "INSERT INTO products SELECT * FROM mydatabase.products
                                ON DUPLICATE KEY UPDATE 

    /* -MDC eof */ 
    I am REALLY new at the MySql and PHP but I am a fast learner.

    I'm assuming the global price changer Name:  GlobalPC.PNG
Views: 51
Size:  5.4 KB

    Is just a piece of SQL code that looks something like this: UPDATE products SET products_price=products_price_w*MARKUP

    I'm just now starting to dig into where all the pages are stored for our sites.

    Thanks in Advance

  2. #2
    Join Date
    Jan 2004
    Blog Entries
    Plugin Contributions

    Default Re: Distributor Global Price Change

    The "products_price_w" field you show comes from an addon ... probably something like Wholesale, or Dual Pricing.
    I'm assuming the "Global Price Changer" thing you referred to is part of that same addon, as it's not part of original Zen Cart code.

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



Similar Threads

  1. Global price change?
    By Nick Alynn in forum General Questions
    Replies: 52
    Last Post: 14 Dec 2011, 01:19 PM
  2. Global price change
    By Vintage in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 1 Feb 2010, 06:37 PM
  3. Prifix Price - Global change???
    By Video Steve in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 1 Oct 2007, 04:40 PM


Posting Permissions

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