Results 1 to 10 of 1684

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by jimmie View Post
    zen 1.56c php 7.0
    i have map pricing module installed (Shows price as - Priced so low Unable to show a price. add to cart to see price.) and this module. when this module is activated it shows the price. how can i not have it effect that module?
    also have certain products price at a sq ft. but sold by the box. this module changes the sq ft. price to sold by the box price.
    this module also takes away the text before the price and only shows the price.
    For MAP, will need to intercept output of this plugin so that it doesn't attempt to actually show what is in the cart for those product. There is I thought a section of code that somewhat covers this situation. Recommendation would be that the plugin be disabled for product that are tracked by MAP which is done at the beginning of the associated code set in the files added to includes/modules/pages/PRODUCT_TYPE/.

    As far as the "sold by the box" versus square foot. This module works off of providing the cost and associated information based off of what the shopping cart itself reports. It is possible to intercept that information and alter it to what is needed for the various product, but whatever it is that makes the product's price display unique upon landing there, needs to be carried over to that processing so that the appropriate "type" of price is shown.

    The shopping_cart class has notifiers that could potentially be used knowing that the current page is say the product_info page and/or that the source function/class is/was the DPU class or a function within it, etc... even perhaps one of the notifiers in the DPU class could be used to intercept the value(s) and do some sort of conversion based on information captured from earlier gathered information when the shopping_cart class ($_SESSION['cart']) was "triggered"/accessed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    969
    Plugin Contributions
    0

    Default Re: Price Updater

    found this, added whats in red but didnt work. not sure what phrase i should put there.
    Code:
    if (defined('DPU_STATUS') && DPU_STATUS === 'true') {
      $load = true; // if any of the PHP conditions fail this will be set to false and DPU won't be fired up
      $pid = (!empty($_GET['products_id']) ? (int)$_GET['products_id'] : 0);
      if (0 == $pid) {
        $load = false;
      } elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || zen_get_products_map_enabled == 1 || STORE_STATUS > 0) {
        $load = false;
      }
      $pidp = zen_get_products_display_price($pid);
      if (empty($pidp)) {
        $load = false;
      }
    and i only want the price to update if product has an attribute

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by jimmie View Post
    found this, added whats in red but didnt work. not sure what phrase i should put there.
    Code:
    if (defined('DPU_STATUS') && DPU_STATUS === 'true') {
      $load = true; // if any of the PHP conditions fail this will be set to false and DPU won't be fired up
      $pid = (!empty($_GET['products_id']) ? (int)$_GET['products_id'] : 0);
      if (0 == $pid) {
        $load = false;
      } elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || zen_get_products_map_enabled == 1 || STORE_STATUS > 0) {
        $load = false;
      }
      $pidp = zen_get_products_display_price($pid);
      if (empty($pidp)) {
        $load = false;
      }
    and i only want the price to update if product has an attribute
    Right place to add something, the question is if it is the right thing to add. I read || zen_get_products_map_enabled == 1to mean that there is something like a function that is named zen_get_products_map_enabled, though if so, I would add parentheses at the end of that to more accurately reflect that it is a function. Otherwise is that supposed to be a variable? If so it is missing a dollarsign at the beginning: $zen_get_products_map_enabled. Or is it a function that is supposed to take a parameter ($_GET['products_id']) so that it can respond to the question of if the "current" product is affected by map?

    BTW, if all this seems "too much", let me know and can provide some more step-by-step searching ideas to better incorporate this concept.

    As far as only updating when product has attributes, then when using the latest software, should note that updates also occur when the product's quantity box is available for edit (following ZC process to determine if the quantity box should be displayed or not). Will need to disable that additional determination which will affect display of price differences caused by quantity discounts and any other determination that is made/shown by way of current quantity in cart and effect of adding additional to the shopping cart as shown on the shopping_cart page.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    969
    Plugin Contributions
    0

    Default Re: Price Updater

    the field in database is labeled map_enabled, there are radio buttons on product edit page 0 = off 1 = on

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by jimmie View Post
    the field in database is labeled map_enabled, there are radio buttons on product edit page 0 = off 1 = on
    If that field is partof the products table, then the following function could be used to lookup the value and take action:
    Code:
    zen_products_lookup($_GET['products_id'], 'map_enabled') == '1'
    This function is built into ZC as compared to possibly using a function associated with MAP. If a function is included with MAP to potentially do a similar search, would recommend first validating that the function exists, followed by (anded) the check of the value.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    969
    Plugin Contributions
    0

    Default Re: Price Updater

    added this
    Code:
    } elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || STORE_STATUS > 0 || zen_products_lookup($_GET['products_id'], 'map_enabled') == '1' ) {
    works fine.
    thankyou
    why the quotes around the 1? (i removed them)
    sq ft price versus carton price, my customers want to see what they are paying per sq ft., but buy by the carton (Min, max Units) DPU Looks at this field and changes the price from sq ft to carton. how to stop this action, or only activate for attributes only.?

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by jimmie View Post
    added this
    Code:
    } elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || STORE_STATUS > 0 || zen_products_lookup($_GET['products_id'], 'map_enabled') == '1' ) {
    works fine.
    thankyou
    why the quotes around the 1? (i removed them)
    sq ft price versus carton price, my customers want to see what they are paying per sq ft., but buy by the carton (Min, max Units) DPU Looks at this field and changes the price from sq ft to carton. how to stop this action, or only activate for attributes only.?
    I used quotes because data retrieved from the database at least such as that is text when initially retrieved. To evaluate it as a number (integer in this case) it should be type cast to that type. By using a non-quoted value, php attempts to do a form of type casting. Ideally the function would have been prefaced with (int) and then also an exact match used (=== 1).

    As far as evaluating to prevent DPU operation for anything that doesn't have attributes, could recommend the following:
    Code:
    !zen_has_product_attributes($pid)
    To be included in the same "path" as the above so that when that is true (doesn't have attributes) that $load will be set to false.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v151 Help with dynamic price updater
    By anderson6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Jul 2014, 08:52 AM
  2. v139h Dynamic Price Updater 3.0 Help!
    By Newbie 2011 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Mar 2014, 06:46 AM
  3. Dynamic Price Updater Error
    By Inxie in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2012, 06:19 PM
  4. Alternative to Dynamic Price Updater?
    By thebigkick in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2012, 11:41 PM
  5. Dynamic Price Updater with href
    By maxell6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Mar 2012, 12:34 AM

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