Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
You are here: Home

DesMas

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • December 10, 2017 at 9:09 am in reply to: WPSPayPalStandard.php – secure against null-values #76838
    DesMas
    Member

    Hello

    I noticed the following fields given as NULL:

    – bill_state

    – ship_state

    – phone

    Every time this happens to one of the fields i get the following error in the log:

    [WPSPayPalStandard.php – line 180] Failed to insert the following into the order table: Array

    I can send you the extracted log via mail due to the personal data in it I do now want to post it here in public.

    December 2, 2017 at 9:18 am in reply to: Photo Seller – wrong toggle logic in wps-custom-admin.js #76792
    DesMas
    Member

    OK.

    Than there was a misunderstanding.

    Maybe the check-box should be named something like “send customized Buyer Email”.

    I believe people mostly think “the positive way” when setting a check-box to checked state :)

    July 21, 2017 at 9:46 am in reply to: Photo Seller – watermark in bulk import failed #75820
    DesMas
    Member

    Hello Peter.

    The problems i have with the watermark process let me take a look into the code.

    Inside the function WPSGallery::createGalleryWatermarkedImages(), that manages this job, i noticed that you are working with a fixed value of 30 seconds: set_time_limit(30).

    That forces the script to break after this amount of time, even if the php.ini defines a higher value.

    Therefore i did a little hack of the code:

    In front of the main foreach loop i added a request to determine the server value:

    Code:
    $max_execution = ini_get(‘max_execution_time’);
    if($max_execution !== false && $max_execution !== “”){
    $max_execution = intval($max_execution);
    }

    your checks for the progress time i changed to the following:

    Code:
    if($progress – $start > $max_execution){
    set_time_limit($max_execution); //reset time limit so there is no timeout
    }

    This seems to work, so the script now honors the server setting.

    Then i wanted to introduce a “skipped count” for the watermark log as i noticed that your called functions return with value 2 if the watermark already exists. A “noop else branch” was already existing in your code:

    Code:
    if(!$result){
    ++$fail_count;
    WPSCommon::log(‘[‘ . basename(__FILE__) . ‘ – line ‘ . __LINE__ . “] Creation of watermark failed for gallery ID “.$gallery_id.”, filename: “.$file_name);
    }elseif($result == 2){
    //do nothing watermark already exists
    }else{
    ++$success_count;
    }

    But your if/else construct does not seem to work correctly, due my introduced skip_count variable was always incremented:

    Wasserzeichen Prozess erfolgreich beendet. Anzahl Bilder: 200 von 200 skipped: 200

    Der Massenimport wurde erfolgreich abgeschlossen. Anzahl importierter Bilder: 100 von 100

    So i changed the construct to type safe comparisons:

    Code:
    if($result === false){
    ++$fail_count;
    WPSCommon::log(‘[‘ . basename(__FILE__) . ‘ – line ‘ . __LINE__ . “] Creation of watermark failed for gallery ID “.$gallery_id.”, filename: “.$file_name);
    }elseif($result === 2){
    //do nothing watermark already exists
    ++$skip_count;
    }else{
    ++$success_count;
    }

    and the values in the “Update the events table” now gets protocoled correctly:

    Code:
    if($event_id != 0){
    if($abort){
    $event_status = ‘aborted’;
    $event_data = __(‘Watermarking was aborted. Number of images watermarked: ‘,’WPS’).$i.’ ‘.__(‘of’,’WPS’).’ ‘.$num_images.’ skipped: ‘.$skip_count;
    }else if($fail_count > 0){
    $event_status = ‘completed’;
    $event_data = __(‘Watermarking has completed with failures. Number of failed watermarks: ‘,’WPS’).$fail_count.’ ‘.__(‘of’,’WPS’).’ ‘.$num_images.’ skipped: ‘.$skip_count;
    }else{
    $event_status = ‘completed’;
    $event_data = __(‘Watermarking has completed successfully. Number of images watermarked: ‘,’WPS’).($i-1).’ ‘.__(‘of’,’WPS’).’ ‘.$num_images.’ skipped: ‘.$skip_count;
    }

    new log:

    Wasserzeichen Prozess erfolgreich beendet. Anzahl Bilder: 461 von 461 skipped: 400

    Der Massenimport wurde erfolgreich abgeschlossen. Anzahl importierter Bilder: 61 von 61

    Wasserzeichen Prozess erfolgreich beendet. Anzahl Bilder: 400 von 400 skipped: 300

    Der Massenimport wurde erfolgreich abgeschlossen. Anzahl importierter Bilder: 100 von 100

    Maybe this is an useful approach.

    July 20, 2017 at 8:58 am in reply to: Photo Seller – watermark in bulk import failed #75819
    DesMas
    Member

    Hello Peter,

    it seams some watermarking processes are still failing due script runtime issues.

    Is there a possibility to call the watermark process for a gallery directly from the console so it might run faster?

    June 10, 2017 at 1:50 pm in reply to: Photo Seller – watermark in bulk import failed #75818
    DesMas
    Member

    Hi Peter

    short update:

    Due the server upgrade I can now handle bulk-uploads of up to 200 files at once and a watermarking process of up to 500 pictures per gallery.

    I posted a little suggest, for a better handling with share-hosters: https://support.tipsandtricks-hq.com/forums/topic/feature-request-optimized-watermark-process?replies=1#post-86788

    June 10, 2017 at 9:13 am in reply to: Photo Seller – watermark in bulk import failed #75817
    DesMas
    Member

    Hi

    the reason for the zero-byte files has been identified and remove. there was an error in my zip-process.

    The watermarking process still fails around image no. 140 (138-141). As there was nothing usefull to find in WP debug_log.txt and WPS log.txt, I now upgrade the server to am more powerfull system.

    old system had:

    – 30 CPU sec.

    – 180 script sec.

    – 256 MB PHP Memory Limit

    new one will have:

    – 60 CPU sec.

    – 300 script sec.

    – 512 MB PHP Memory Limit

    add:

    the shop was also upgraded to version 2.2.0.

    June 7, 2017 at 6:19 pm in reply to: Photo Seller – watermark in bulk import failed #75815
    DesMas
    Member

    Hi

    The bulk-import seems also to break at some circumstances when no watermark is enabled.

    I tried to bulk-import 5 zip files, all with 50 images in them.

    The last file got stuck at Processing image 243 of 246.

    That showed me that allready 4 images did not get correctly imported. Therefore I took a look into the upload folder (wp-content/uploads/wp_photo_seller/7/a45798fz40) for this gallery and there are 4 zero-byte files listed with numeric names: , 19, 4, 7, 9.

    246+4 = 250 files.

    so, whats wrong here?

    June 4, 2017 at 8:42 am in reply to: WP Photo Seller – Only Manual Payment Orders are Shown in order History #74240
    DesMas
    Member

    Hi Peter,

    There are also two other non satisfied constraints to fix:

    1. $pp (check for empty does not work)

    2. $pp

    With these fixes, the order gets stored on the database.

    WPSPayPalStandard.php::95

    Code:
    //Check for type of delivery method
    if ($deliveryMethod == ‘Pickup’ || is_null($pp[‘mc_handling’]) ) { //FCA 20170604: added check for null
    $shipping_cost = 0;
    } else {
    $shipping_cost = $pp[‘mc_handling’];
    }

    //$contact_ph = empty($pp[‘contact_phone’])?”:$pp[‘contact_phone’];
    $contact_ph = is_null($pp[‘contact_phone’])? ” : $pp[‘contact_phone’]; //FCA 20170604: changed to check for null
    $pp_tax = is_null($pp[‘tax’])? ” : $pp[‘tax’]; //FCA 20170604: added check for null

    $data = array(
    ‘bill_first_name’ => $pp[‘address_name’],
    ‘bill_address’ => $pp[‘address_street’],
    ‘bill_city’ => $pp[‘address_city’],
    ‘bill_state’ => $pp[‘address_state’],
    ‘bill_zip’ => $pp[‘address_zip’],
    ‘bill_country’ => $pp[‘address_country’],
    ‘ship_first_name’ => $pp[‘address_name’],
    ‘ship_address’ => $pp[‘address_street’],
    ‘ship_city’ => $pp[‘address_city’],
    ‘ship_state’ => $pp[‘address_state’],
    ‘ship_zip’ => $pp[‘address_zip’],
    ‘ship_country’ => $pp[‘address_country’],
    ‘shipping_method’ => $deliveryMethod,
    ’email’ => $pp[‘payer_email’],
    ‘phone’ => $contact_ph,
    ‘shipping’ => $shipping_cost,
    ‘tax’ => $pp_tax, //$pp[‘tax’], //FCA 20170604: added check for null
    ‘subtotal’ => $subtotal,
    ‘total’ => $pp[‘mc_gross’],
    ‘coupon’ => $coupon_code,
    ‘discount_amount’ => $discount,
    ‘trans_id’ => $pp[‘txn_id’],
    ‘ordered_on’ => date(‘Y-m-d H:i:s’, WPSCommon::localTs()),
    ‘status’ => $status,
    ‘ouid’ => $ouid,
    ‘payment_method’ => ‘Paypal’,
    ‘payment_status’ => ‘Complete’,
    ‘share_cart_discount_amount’ => $share_cart_discount
    );

    June 4, 2017 at 8:26 am in reply to: WP Photo Seller – Only Manual Payment Orders are Shown in order History #74239
    DesMas
    Member

    Hi Peter,

    as thought, its a constraint

    Code:
    [04-Jun-2017 08:16:17 UTC] WordPress-Datenbank-Fehler Column ‘shipping’ cannot be null für Abfrage INSERT INTO wp_ssg_wps_orders …

    As far as i can see, you are setting the shipping value in a fallback to the PayPal value “$pp” but it has not been secured that this is not NULL:

    WPSPayPalStandard.php::95

    Code:
    //Check for type of delivery method
    if ($deliveryMethod == ‘Pickup’) {
    $shipping_cost = 0;
    } else {
    $shipping_cost = $pp[‘mc_handling’];
    }

    A look into the WPS Debug statement for the “[WPSPayPalIpn.php – line 65] Starting WPSPayPalIpn::saveCartOrder: Array” also does not show this entry as part of the array.

    I also see 2 other WPS relevant warnings i the log:

    Code:
    [04-Jun-2017 08:16:17 UTC] PHP Notice: Undefined index: mc_handling in /kunden/124913_23714/SSG4/wp-content/plugins/wp-photo-seller/payment_gateways/WPSPayPalStandard.php on line 99
    [04-Jun-2017 08:16:17 UTC] PHP Notice: Undefined index: tax in /kunden/124913_23714/SSG4/wp-content/plugins/wp-photo-seller/payment_gateways/WPSPayPalStandard.php on line 120

    June 4, 2017 at 8:07 am in reply to: WP Photo Seller – Only Manual Payment Orders are Shown in order History #74237
    DesMas
    Member

    Hi Peter,

    logging is enabled by default.

    Here a snipped of the log.txt, with some faked fields for security reasons (would send it by mail if you wish):

    Code:
    [LOG DATE: 06/03/2017 6:31:23 pm – Server time zone UTC]
    [WPSPayPalStandard.php – line 172] Failed to insert the following into the order table: Array
    (
    [bill_first_name] => Max Muster
    [bill_address] => Am Musterberg 19
    [bill_city] => Musterdorf
    [bill_state] =>
    [bill_zip] => 12345
    [bill_country] => Germany
    [ship_first_name] => Max Muster
    [ship_address] => Am Musterberg 19
    [ship_city] => Musterdorf
    [ship_state] =>
    [ship_zip] => 12345
    [ship_country] => Germany
    [shipping_method] => Herunterladen
    [email] => m.muster@musterland.de
    [phone] =>
    [shipping] =>
    [tax] =>
    [subtotal] => 7.5
    [total] => 7.50
    [coupon] => none
    [discount_amount] => 0
    [trans_id] => xxxxxxxxxxxxxxxxxxxx
    [ordered_on] => 2017-06-03 18:31:23
    [status] => Pending
    [ouid] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    [payment_method] => Paypal
    [payment_status] => Complete
    [share_cart_discount_amount] => 0
    [delivery_status] => Complete
    )

    [LOG DATE: 06/03/2017 6:31:23 pm – Server time zone UTC]
    Product Name: 15vwBredeneek-5838 – Digital : [022-200210] – Social Media Bild mit Wasserzeichen – einmalig(1296×864)

    [LOG DATE: 06/03/2017 6:31:23 pm – Server time zone UTC]
    [WPSPayPalStandard.php – line 255] Just about to insert the following ordered item into the order_items table: Array
    (
    [order_id] => 0
    [product_id] => 236
    [item_number] => 236
    [product_name] => 15vwBredeneek-5838 – Digital : [022-200210] – Social Media Bild mit Wasserzeichen – einmalig(1296×864)
    [product_price] => 7.5
    [description] => 15vwBredeneek-5838 – Digital : [022-200210] – Social Media Bild mit Wasserzeichen – einmalig(1296×864)
    [quantity] => 1
    [gallery_id] => 1
    [digital_ratio] => 1
    [variation_description] => 15vwBredeneek-5838 – Digital : [022-200210] – Social Media Bild mit Wasserzeichen – einmalig(1296×864)
    [duid] => 6c8d104ba8bd760bcc334b17da95f924
    [form_entry_ids] => none
    [date] => 2017-06-03 16:31:23
    [full_gallery_purchase] => 0
    [variation_id] => 76
    )

    I’ll turn on the WordPress Debug mode and test it again to see what the insert() function has to claim about this

    June 3, 2017 at 5:27 pm in reply to: WP Photo Seller – Only Manual Payment Orders are Shown in order History #74235
    DesMas
    Member

    Hello

    I can confirm, that orders with direct payment via paypal do not get listed in “list of orders”.

    The items get stored in the wps_order_items table with order_id set to 0.

    The table wps_orders shows no entry for this order.

    Plugin-Version: 2.1.5

    Wordpress Version: 4.7.5

    WPMU: No

    MySQL Version: 5.6.19

    PHP Version: 5.6.21

    Session-Speicherort: /tmp

    CURL Bibliothek-Schenkung: Yes

    Datei Schreibrechte debuggen: Writable

    August 27, 2016 at 3:35 pm in reply to: Photo Seller – sorting possibility for variations #74045
    DesMas
    Member

    Hi Peter.

    Thx for the reply.

    Yes i used that for ordering the frontend alphabetically. But

    a) it has no effect for real ordering in the backend.

    b) sometimes you want to group the physical variations not that way but somehow other. Like for promoting a special variation with a earlier position in the list.

    PS: using the given sorting possibility in the backend by clicking on the table titles results in a pricelist with no items displayed (&orderby=name&order=asc).

  • Author
    Posts
Viewing 12 posts - 1 through 12 (of 12 total)

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ