Page 158 of 167 FirstFirst ... 58108148156157158159160 ... LastLast
Results 1,571 to 1,580 of 1668
  1. #1571
    Join Date
    Jan 2013
    Posts
    811
    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

  2. #1572
    Join Date
    Jul 2012
    Posts
    16,732
    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...

  3. #1573
    Join Date
    Jan 2013
    Posts
    811
    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

  4. #1574
    Join Date
    Jul 2012
    Posts
    16,732
    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...

  5. #1575
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
    thanks,
    John
    John

  6. #1576
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by GoldBuckle View Post
    Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
    thanks,
    John
    I don't have an answer to that, I don't really know of anything that USU does that would/should have an effect on DPU. DPU doesn't check for information on the URI to worry if it is a ".php" versus ".html" page. I would expect that USU doesn't modify the internal $_GET variables in a way that removes existing information. There are other factors that may be at play causing an issue with display (eg. a script error from some other code could prevent DPU script code from firing). It is recommended to use the latest version(s) which include ZC (version not identified in above post).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Dynamic Price Updater

    Quote Originally Posted by GoldBuckle View Post
    Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
    thanks,
    John
    Quote Originally Posted by mc12345678 View Post
    I don't have an answer to that, I don't really know of anything that USU does that would/should have an effect on DPU. DPU doesn't check for information on the URI to worry if it is a ".php" versus ".html" page. I would expect that USU doesn't modify the internal $_GET variables in a way that removes existing information. There are other factors that may be at play causing an issue with display (eg. a script error from some other code could prevent DPU script code from firing). It is recommended to use the latest version(s) which include ZC (version not identified in above post).
    Although I haven't heard/seen others having issues with USU and DPU together, doesn't mean that there haven't been those that have had them. I saw your post in the USU forum which was far more detailed than the above. Got me thinking about the possibility that USU might be trying to rewrite othe uri for ajax.php just maybe. As a result some of the "return" code may not be executing and therefore the spinning graphics shows if enabled or if disabled the price doesn't update. (by disabled, I mean the spinning graphic.)

    If able, think could PM me a page address of a problem product? Maybe could take a look at the page to see what is going on.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #1578
    Join Date
    Jan 2013
    Posts
    811
    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.?

  9. #1579
    Join Date
    Jul 2012
    Posts
    16,732
    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...

  10. #1580
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater and bootstrap template

    I am running a clean install of v 1.5.7 with demo product info and then the first thing I did was install DPU 3.2.0 and went to a test product page once I turned on DPU in the admin configuration and the page just keeps refreshing. Not sure where to start to fix it.
    John

 

 

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

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