-
Posts
42 -
Joined
-
Last visited
Posts posted by CraigA
-
-
I ran it manually in cli and saw the output: Undefined variable: argv on line
I was able to fix it by following @Evaske's instructions here http://www.blesta.com/forums/index.php?/topic/1226-cron-issues/?hl=cron
(enable register_argc_argv)
-
Manually runs fine. I've been trying to run it manually as much as I can to make sure account activations are completing.
-
As the title says, cron hasn't been running since the upgrade. (or perhaps shortly before, not sure)
I've been running it manually. I checked crontab as root and the cron string is in there. I'm not sure where else to look to trouble shoot this.
Any ideas?
-
$coupon = $GET['code'];
$id = $api->put("Coupons", "add", array('code' => $coupon, 'company_id' => "1", 'max_qty' => "1", 'end_date' => "2013-11-17 03:59:59",'recurring' => "0", 'limit_recurring' => "0", 'packages' => array('0' => "10"), 'currency' => "USD", 'amount' => "100.0000"))->response();returns "Internal error: Failed to retrieve the default value"
can you point me in the right direction Tyson?
-
Sounds good. I'm going to write a utility to iterate through this CSV and import it all the codes then. If I could get some confirmation on which tables need to be updated that would really help.
Basically these Wag Jag coupon codes are going to give a 100% discount and will expire November 16th. I created a special package just for the Wag Jag customers, which got assigned package id "10"
Looking at the DB I came up with this:
table: coupons
fields: id, code, company_id, used_qty, max_qty, start_date, end_date, status, type, recurring, limit_recurring
table: coupon_amounts
fields: coupon_id, currency, amount, type
table: coupon_packages
fields: coupon_id, package_id
%fcid% = first coupon code available
Pseudo code:
for $i = %fcid% to 1500+%fcid%
table coupons
id = $i, code = from csv, company_id = my company id, used_qty = 0, max_qty = 1, start_date = 2013-10-08 00:00:00, end_date = 2013-11-17 00:00:00, status = active, type = exclusive, recurring = 0, limit_recurring = 0
table coupon_amounts
coupon_id = $i, currency = my currency, amount = 100.0000, type = percent
table coupon_packages
coupon_id = $i, package_id = 10
loop
other than these three tables, are there any other tables I would have to update with the utility for a successful import? -
Does anyone know a quick way to import coupon codes?
WagJag.com is going to be running a special on my company and they've provided me with 1500 codes to import
-
Since client_main.php is apart of the patch, if you did not merge your custom changes with the patched file, then they were overwritten.
Based on your code excerpt, $field_values is undefined:
'customfield' => $field_values[0]->value
Life saver! I forgot to move over the definition. I really love your guys support.
-
Do you mean app/controller/client_main.php?
Cody or Tyson should be able to help with this.
yes sorry, client_main.php
-
Hello all,
I just upgraded from 3.0.1 to 3.0.4.
I edited the app/controller/client_main.pdt to include custom field data as I have in all previous version, however, the info just isn't showing up anymore in the my info section of the main login for the client. (echoing the variable shows nothing).
app/controller/client_main.pdt
$myinfo_settings = array( 'invoice' => array( 'enabled' => ("true" == $client->settings['client_set_invoice']), 'description' => Language::_("ClientMain.myinfo.setting_invoices", true, $invoice_method_language) ), 'autodebit' => array( 'enabled' => true, 'description' => $this->getAutodebitDescription() ), 'customfield' => $field_values[0]->value );
app/view/client/default/client_main_myinfo.pdt
$customfield = $this->Html->_($myinfo_settings['customfield'], true); echo "Custom field: <b>" . $customfield . "</b><br />";
Any ideas why this isn't working on the new version?
-
Ahhh I didn't see the getByUserid there, must've been too tired.
Thanks a lot Tyson, exactly what I needed
-
Hello all,
I'm trying to write something based on the API SDK
$api = new BlestaApi($url, $user, $key); $response = $api->get("users", "getByUsername", array('username' => $_GET["username"])); $valid = $api->get("users","validatePasswordEquals", array('password' => $_GET["password"], 'user_id' => $response->response()->id)); //setCustomField( integer $field_id, integer $client_id, string $value ) //getCustomField( integer $field_id, integer $company_id = null ) $cf = $api->get("Clients","getCustomField", array('field_id' => 5)); print_r($response->response()); print_r($valid->response()); print_r($cf->response()); print_r($response->errors());
I'm pretty sure someone is going to tell me my logic is wrong here. Basically what I was going to do here is something along the lines of:
if $valid->response() = 1
setCustomField(blah blah blah)
The issue I'm having is although both the client_id and user_id exist in the 'clients' database table, I'm not sure how to equate the user_id to the client_id so that I can use the 'setCustomField' call.
Any help/suggestions/reprimand for not doing this the correct way/pointers on how to do it the correct way?
Thanks,
Craig
-
Must have been an anomaly on my end. Thanks for helping me verify Mike.
-
Thanks Mike,
Could you do me a favour and check the contents in the contacts table of your dev db? When this was recreated on my end it didn't show both ID's until the person with the new ID made a purchase. I just wonder if that might have something to do with it.
-
-
If this is confirmed I will post it in the Bugs section.
-
I need confirmation from another on this.
Steps to recreate:
1) Create a new client via registration form.
2) Delete that client via admin portal
3) Create a new client via registration form
4) See if there is duplicate user data in the "Clients" page on the admin portal.
I had this earlier this week and had to delete a row manually from the 'contacts' database table.
Regards,
CraigA
-
-
Hello Gents,
I believe I've found a bug with the couponing system.
Steps to recreate are as follows:
1) Create a coupon exclusive to a specific package
2) Try and apply that coupon to any package
The exclusivity does not stick. A coupon can be applied to any package.
Regards,
CraigA
-
I think Cody's fix from the other thread should be
update /app/models/clients.php (line 89):
$this->setCustomField($field->name, $client_id, isset($vars['custom']) && array_key_exists($field->name, $vars['custom']) ? $vars['custom'][$field->name] : null);
to
$this->setCustomField($field->id, $client_id, isset($vars['custom']) && array_key_exists($field->id, $vars['custom']) ? $vars['custom'][$field->id] : null);
I can confirm this has resolved my issue.
Thanks for the great support guys!
-
This custom field is the cornerstone of my business lol. I can't disable it. I'm supposed to launch in less than 2 hours :'(
-
Sounds like a bug with how the order form passes custom field values for validation. I believe custom fields are validated one at a time, so even if all of them are erroneous, only the first error would show.
This could be true. Just wanted to note that mine shouldn't be erroring at all. It works fine when editing "My Info" once the account is already created.
-
-
I had to wrap that in // for it to work with existing clients, but still errors out on using the order form to create a new client account
-
That does not work in either scenario (when the client is created manually and then updates their info, or trying to check out as a new customer)
The two regex's I posted work when a client is already created and updates their information. It just generates and invalid message during checkout with new clients.
Delete/edit A Ticket
in Support
Posted
I know this has been asked before, but hopefully there is some kind of solution.
I just had a customer put his credit card information in to a ticket. I want to remove the number so that I can't be held liable in the very slim chance that my Blesta instance/web server gets hacked.
Any ideas?