Jump to content

Search the Community

Showing results for tags 'argc'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hoping someone can assist me. I'm have an hourly cron job that runs a bootstrapped script in my public_html folder but it is failing with the following error. <b>Notice</b>: Undefined index: argc in <b>/home/melbo111/public_html/wire/core/ProcessWire.php</b> on line <b>189</b><br /> The process used to run with the above error and still work but now on the live environment it doesn't work at all. Hopefully resolving this error will sort out my issues. Here is my cron script: 0 * * * * /usr/bin/php -q /home/melbo111/public_html/abandon_cart.php And this is abandon_cart.php <?php include("index.php"); $timer = time() - 3600;//1hr ago $ab_orders = $wire->pages->find("template=order, payment_status=, order_date<$timer"); $flogo = "http://www.melbournechristmastrees.com/site/assets/files/1/logo.png";//$wire->pages->get(1)->logo->httpUrl; if(!empty($ab_orders)){ foreach($ab_orders as $ab_order){ if(isset($ab_order->stand) && $ab_order->stand === 1){ $stand = 'Yes'; }else { $stand = 'No'; } if(isset($ab_order->installation) && $ab_order->installation === 1){ $installation = 'Yes'; }else { $installation = 'No'; } if(isset($ab_order->removal) && $ab_order->removal === 1){ $removal = 'Yes'; }else { $removal = 'No'; } $colink = $wire->pages->get(1175)->httpUrl.'?acid='.$ab_order->id; $EmailTo = $ab_order->email; $subject ="Don't miss out on your Christmas tree"; $body = "<table width='600' align='center' border='0' cellpadding='0' cellspacing='0'> <tr> <td align='center' style='padding-top:10px; padding-bottom:20px;'> <img src='$flogo' height='80' alt='Melbourne Christmas Trees'> </td> </tr> <tr> <td><p>Dear $ab_order->shipping_first_name</p> <p>We noticed your shopping cart at Melbourne Christmas Trees has been reserved and is waiting for you.</p> In your cart you left: <ul> <li>$ab_order->product_ordered</li> <li>Stand: $stand </li> <li>Installation: $installation</li> <li>Removal: $removal</li> </ul> To complete your purchase, click the below link: <p style='text-align:center; padding-bottom:40px;'><a href='$colink' style='padding-top:10px; color:#fd2864; font-weight:bold;'>Complete Your Purchase</a></p> </td> </tr> <tr> <td style='padding-top:20px; padding-bottom:20px;'> <p style='color:#82b849; font-size:18px; text-align:center;'><strong>Have a fantastic Christmas from Melbourne Christmas Trees. </td> </tr> </table>"; $headers = 'MIME-Version: 1.0'."\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n"; $headers .= "From: Melbourne Christmas Trees <{$wire->users->get('xxxx')->email}>"."\r\n"; mail($EmailTo, $subject, $body, $headers); $ab_order->of(false); $ab_order->payment_status = "emailed_abandoned_cart"; $ab_order->save(); $wire->log->save('ac_emails', 'Order ID: '.$ab_order->id); $hazrun = true; } } echo "abandon process"; ?> I'm not a real coder and have hacked together so any general feedback on my code is also appreciated. Thanks!
×
×
  • Create New...