Page 153 of 154 FirstFirst ... 53103143151152153154 LastLast
Results 1,521 to 1,530 of 1535
  1. #1521
    Join Date
    Jan 2013
    Posts
    678
    Plugin Contributions
    0

    Default Re: Price Updater

    this is the code to turn on or off my custom pics
    Code:
    <!--bof not in JNS Flooring and Supplies stock icon  -->
                <?php if ($products_quantity <= 0) { ?>
                    <?php echo TEXT_PRODUCT_NOT_IN_STOCK; ?>
                <?php } ?>
                <!--eof not in JNS Flooring and Supplies stock icon  --> this one dissapears after price updater refeshes its price
    Code:
    <!--bof free ship Freight icon  -->
                            <?php if($product->fields['product_is_always_free_shipping'] == 3) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_FREIGHT; ?></div>
                            <?php } ?>
                            <!--eof free ship Freight icon  -->
    this 1 still shows

  2. #1522
    Join Date
    Jan 2013
    Posts
    678
    Plugin Contributions
    0

    Default Re: Price Updater

    figured it out i had moved this </h2> to after, moved it to b4

  3. #1523
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by jimmie View Post
    figured it out i had moved this </h2> to after, moved it to b4
    Hopefully when that got moved, all of the other tags that were still open got closed in the reverse order. Though, looking at the source code, that does not appear to be the case at least in the beginning of the whole thing:
    Code:
    <!--bof Product Price block -->
    <h2 id="productPrices" class="productGeneral">
    <span id="retail">Price: $125.69</h2>
        <!--eof Product Price block -->
    The span is still open when the h2 that contained it is now closed...

    That is part of what I was talking about regarding passing html validation.

    Regarding ignoring the quantity box, there are basically two conditions to consider: 1) do you want calculation to consider the need to order a minimum quantity for any product, 2) do you want all prices affected to be based on a quantity of 1.

    Further could force all product to automatically only consider the addition of a set quantity and remove the quantity box from the customer, but that potentially affects how your customers "shop".

    The line of code that evaluates the user entered quantity is found in: includes/classes/dynamic_price_updater.php

    And is similar to this in several locations:
    Code:
    $this->shoppingCart->contents[$products_id] = array('qty' => (convertToFloat($_POST['cart_quantity']) <= 0 ? zen_get_buy_now_qty($products_id) : convertToFloat($_POST['cart_quantity'])));
    The key part of finding the location(s) to edit are where 'qty' is used and assigning the value to be used. Currently it checks the number entered, if it is less than the minimum allowed then the minimum is used (final purchase requires the minimum), if it exceeds the minimum then basically the value entered is used. You may want to use 1 regardless...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  4. #1524
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    87
    Plugin Contributions
    0

    Default Re: Price Updater

    I've recently updated to ZC 1.5.6b and also had some updates to my theme template (that came bundled with Dynamic Price Updater). Server is running PHP 7.1.5. I'm getting the following Debug error when DPU is turned on (on the product page there's a loading indicator where a sale price of an item should be). I've checked all the DPU related files with the most recent plugin package and everything seems to match, so I'm at a loss where to look.

    Code:
    [05-Jun-2019 11:25:03 EST5EDT] PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
    Stack trace:
    #0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
    #1 {main}
    thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10
    
    [05-Jun-2019 11:25:03 EST5EDT] Request URI: /catalog/ajax.php?products_id=1004&cPath=34_93_38&number_of_uploads=0&act=DPU_Ajax&method=dpu_update, IP address: 67.245.196.78
    --> PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
    Stack trace:
    #0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
    #1 {main}
    thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10.

  5. #1525
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by gwynwyffar View Post
    I've recently updated to ZC 1.5.6b and also had some updates to my theme template (that came bundled with Dynamic Price Updater). Server is running PHP 7.1.5. I'm getting the following Debug error when DPU is turned on (on the product page there's a loading indicator where a sale price of an item should be). I've checked all the DPU related files with the most recent plugin package and everything seems to match, so I'm at a loss where to look.

    Code:
    [05-Jun-2019 11:25:03 EST5EDT] PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
    Stack trace:
    #0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
    #1 {main}
    thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10
    
    [05-Jun-2019 11:25:03 EST5EDT] Request URI: /catalog/ajax.php?products_id=1004&cPath=34_93_38&number_of_uploads=0&act=DPU_Ajax&method=dpu_update, IP address: 67.245.196.78
    --> PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
    Stack trace:
    #0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
    #1 {main}
    thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10.
    Oye, that's a new one...

    First off, I see the above paths; however, noting that a portion of the path was replaced with x's did the original path have two forward slashes back-to-back like that? If so, then there may be an issue related to that, if not, let's continue.

    What is effectively reported is that the DPU class is not being loaded by ajax.php when calling to require includes/application_top.php
    Which seems to indicate that the file: includes/auto_loaders/config.dynamic_price_updater.php is not in place, or if it is, that the template/store is using an auto_loader prefix other than config.

    That latter is possible, but not normal.

    I would ask if the same issue occurs when temporarily using one of the default templates, but that requires putting the includes/templates files in the corresponding directory basically.

    Initially I was thinking that perhaps the necessary jscript template file wasn't present, but the ajax class was loaded. :/ if the file wasn't present then the built in XHR would have kicked in, if it was then the zcJS variable would be used...

    Other than checking that the necessary files are present, I would have to suggest looking at what other files are installed or where modified what the change(s) did.

    Could PM the address to see if I might see something of assistance.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #1526
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    87
    Plugin Contributions
    0

    Default Re: Price Updater

    I apologize, those double slashes were my sloppy find/replace. The file paths are correct.

    The includes/auto_loaders/config.dynamic_price_updater.php is in place

    In terms of file changes, there were only 2 that were changed for the template update.
    includes/languages/english/extra_definitions/yourstore/dynamic_price_updater.php
    includes/modules/pages/product_info/jscript_dynamic_price_updater.php
    I've attached the files here.Attachment 18482

    Let me know if you see anything there, otherwise I can PM FTP/login info to let you look further. Thanks for your help!

  7. #1527
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by gwynwyffar View Post
    I apologize, those double slashes were my sloppy find/replace. The file paths are correct.

    The includes/auto_loaders/config.dynamic_price_updater.php is in place

    In terms of file changes, there were only 2 that were changed for the template update.
    includes/languages/english/extra_definitions/yourstore/dynamic_price_updater.php
    includes/modules/pages/product_info/jscript_dynamic_price_updater.php
    I've attached the files here.Attachment 18482

    Let me know if you see anything there, otherwise I can PM FTP/login info to let you look further. Thanks for your help!
    FYI, the attachment is considered invalid. Not sure why, but unable to download it. PM may be necessary.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  8. #1528
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,833
    Plugin Contributions
    25

    Default Re: Price Updater

    Quote Originally Posted by mc12345678 View Post
    Possible, yes, would expect. Apparently haven't finished off the stock update aspect otherwise there would be something assigned to that "missing" constant.

    To be sure that am working on the right thing(s), could you please either explain what you are seeing and what conditions are necessary to recreate it, or provide a link to a problem product about which I may still have similar questions?

    As to the variable/constant assignment, I tried to incorporate something that could be displayed in proximity to the existing information or to replace it. I tried to leave the constant open for assignment to maybe include what you are asking which is to still show the original price. As to the price of zero, that's where understanding the configuration comes into play.
    Any progress on this? as the constant DPU_SHOW_OUT_OF_STOCK_IMAGE is still undefined.

  9. #1529
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,062
    Plugin Contributions
    29

    Default Re: Price Updater

    in the code there is this:

    switch (true) {
    case ($this->product_stock > 0): // No consideration made yet on allowing quantity to go less than 0.
    $this->responseText['stock_quantity'] = $this->product_stock;
    break;
    case (true):
    $out_of_stock = false;
    if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true')) {
    $out_of_stock = true;
    }
    case ($out_of_stock && $this->num_options == $this->unused && !empty($this->new_temp_attributes)):
    etc.
    I don't get the logic behind the second case (true):
    or rather don't find a similar construct on the web to explain its use here....
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  10. #1530
    Join Date
    Jul 2012
    Posts
    14,693
    Plugin Contributions
    17

    Default Re: Price Updater

    Quote Originally Posted by torvista View Post
    in the code there is this:


    I don't get the logic behind the second case (true):
    or rather don't find a similar construct on the web to explain its use here....
    So, unfortunately the code segment didn't carry over to this post (quoted text maybe?), but at the time of development/incorporation, the thought was: there was no need for $out_of_stock to be defined if there was stock. But, it would be needed for the cases beyond.
    The select criteria is set to act on case statements that are true. Therefore if the first case is false the next case is evaluated. The second case evaluates to true by default and is processed. The absence of a break causes the third and subsequent cases to be evaluated until true with a break that follows or default is reached.

    Further because the $out_of_stock variable made up part of the "if" structure, I was trying to keep it a part of the logic rather than either pulling it completely out to a separate statement or to repeat the code at each subsequent case. This way the processing logic would be fully contained to this dropdown structure rather than separate parts that would have to be maintained together.

    Typical examples would show some part of each of these aspects which were grouped together to give this select structure.

    So, besides the interest in its presence, what issue(s) are trying to be resolved?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

 

 

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