, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > A few things I need help with.

FlexCMS Support Forum


A few things I need help with.
Started December 4, 2009 @ 11:17am by Rory
Post Message 
Rory


Posts: 30
 
A few things I need help with.December 4, 2009 @ 11:17am
Hi Again
My site is coming on fine, hope to go live January, just sorting out the purchasing side of things and have come accross a few things I cant solve.

Can you use the store to give away a Free item? A freebee?
As all the attributes it has i.e. recording of the order etc are ideal.
Also
At the moment an email is being sent to say the order has been received and is being processed.
But no email is being sent to confirm payment or shipment.
Also nothing is going into the ec-Sales database after I confirm payment and shipment, should there be something entered?
(I have altered a few things in your script to suite, nothing that should stop it from working though but even when I uploaded the original it still does not send emails or enter items to the ec-Sales DB).

Re the Calendar
It runs out in 2010 is there a way of adding more years?

Re Refering Pages in the control panel I am getting:
Fatal error: Cannot use string offset as an array in /hermes/bosweb/web285/b2858/apo.uzayke/mydivision.co.uk/inc-cs-admin-stats_referrals.php on line 79
and with Page Views by page
Fatal error: Cannot use string offset as an array in /hermes/bosweb/web285/b2858/apo.uzayke/mydivision.co.uk/inc-cs-admin-stats_pages.php on line 365
No too fussed on them as they do not affect the running of the site but would be nice to have no errors.

Finally come 1st January I wish to change the web address from .co.uk to .com can you help me on that too please.

I am now a lot more used to basic php than I was when I first got in touch, but still struggle with loops and the advanced ways.
Your help is much appreciated.
Cheers
Rory
 
DCSun
Administrator



Posts: 625
 
December 4, 2009 @ 10:02pm
Rory,

Hopefully this answers all your questions. If there's any I missed just reply below.

- No, the store cannot currently be used for items without a price. There is a hack available to display items without a price (such as to make it a catalog instead of an active store), but it won't currently function through the checkout process without a price.

- There are many variables which might impact the shipping and payment emails, so lets start with the simple ones first; When you record the payment is the "Notify Customer that payment has been received." box checked? Does it successfully record that the payment has been received in the orders list/details? Does the payment message show up in the order details page afterwards?

- ec-Sales is for something else we'll be developing in the future. Completed store orders go in the ec-Orders table, you should see data there if any orders have been completed.

- The calendar has been extended to 2020 in a subsequent release to the one you're using (I believe that was done in 3.0). If you wanted/needed to add more in the meantime, really it's just the input boxes that currently limit that to 2010, you'll notice if you go through the public version of the calendar with the next month links it does go past that.

- Those errors are due to your server being upgraded to PHP 5 and you using a version prior to those fixes being added to FlexCMS (v3.0 or later). You're correct that they won't impact the running of the site, simply the displaying of those stats. You can either upgrade your site completely (note all your source file changes first as you'll have to integrate them back in again afterwards), or just grab those particular files from the upgrade package and replace them.

- Yes, we can help you change your site's main address. Really it's quite simple if you're using a free license, just go ahead and change it through your control panel. If you have a standard or professional license you want modified just drop us a note when you're ready to do that.

- PHP is a lot like life, you never know everything. And if by some miracle you happen to at some point, it's constantly growing and evolving with new features and functions. I learn new stuff about it all the time, maybe that's part of what keeps it interesting and enjoyable.


David


FlexCMS v3.2 Has Been Released!
 

Last Edit: December 4, 2009 @ 10:06pm by DCSun
Rory


Posts: 30
 
Re store etcDecember 7, 2009 @ 6:15am
Thanks for the quick reply
I have worked out a way of doing a freebee but was hoping for an easier way.
The way I did it was to charge 0.01 and for shipping call one Discount and give them a -0.01 making the total 0.00
Then in the script change a few things so if item == "free_item_number" echo "Free" else echo "ammount" thus showing no price. And hiding paypal when the item is picked.

Re the email bit. Yes the tick boxes were ticked and it records all the details ok in the db, The payment record shows up and received payment shows up ok, also the sent messages show ok on the order details page afterwards.

It sends the two emails when ordering ok
"Congratulations! The following order has been placed." and "Thank you for selecting etc.. your order is being processed".

Just the two emails that are not being sent are
"Notify Customer that payment has been received."
and
"Notify Customer that order has been shipped."

Just out of curiosity what does OrderStatus = "a" do. As that letter does not change throughout the order placement when refreshing the db?

Thanks for the Calendar answer, I will have to look into it and add some years.
The error due to php 5 I will also now address.
And re the change of domain name, I'd like the new domain to start on 1st January, so will send a reminder just before.
Cheers
Rory
 
DCSun
Administrator



Posts: 625
 
December 7, 2009 @ 12:18pm
Sorry you had to go through so much trouble to have it work with free items. We'll have a look at allowing it to work that way in the future.

I don't know why those two emails aren't sending there, they do on other sites. And they should be pretty simple text emails as well. Put this code in a page and see what it does:
Code

$Message = $MsgText[9][229]." ".$FormArguments['OrderID']."-".$row['OrderID'].".".$AdditionalInformation."\n\n".$MsgText[9][230]." ".$MsgText[9][239]."\n\n\n".$MsgText[9][231]."\n\n\n".$Settings['SiteName']."\n".$Settings['BaseURL'];

$NotifyEmail = 'youremailaddress@something.something';
$ecSettings['OrdersEmail'] = $NotifyEmail;

mail($NotifyEmail, $MsgText[9][232].' '.$FormArguments['OrderID'].'-'.$row['OrderID'], $Message, 'From: "'.$Settings['SiteName'].'" <'.$ecSettings['OrdersEmail'].'>','-f'.$ecSettings['OrdersEmail']);
(yes that's quite a mess, I just grabbed the code that's used to send the payment email and left as much the same as possible)

OrderStatus is a hold over from an earlier version, I don't think it's used for anything at the moment.


David


FlexCMS v3.2 Has Been Released!
 
Rory


Posts: 30
 
December 7, 2009 @ 6:20pm
Nothing showed on the page except the word Home.
The e-mail worked ok I Received

Payment has been received and processed for your order -.

You will be notified again when your order is shipped. If you have any questions or concerns, please feel free to contact us.


Thank you for your order. We appreciate your business!


MyDivision
http://www.mydivision.co.uk

I've checked the script and they match, even tried cut n pasting your script into the modify-save file, replacing the existing and still no email is sent.

this is what I have inbetween the two bits

$query = "insert into `".$Settings['DBPrefix']."ec-StatusMessages` (Account, OrderNum, DateCode, Title, Text) values ('".$row['Account']."', '".$FormArguments['OrderID']."', '".$DateCode."', '".str_replace('\'','\\\'',$MsgText[9][232])."', '".addslashes($Message)."')";
$result = mysql_query($query) or die (mysql_error());

$query2 = "select * from `".$Settings['DBPrefix']."core-Users` where RecordNumber='".$row['Account']."' limit 1";
$result2 = mysql_query($query2) or die (mysql_error());
$row2 = mysql_fetch_array($result2);

$NotifyEmail = $row2['Email'];

perhaps if you can e-mail me a working copy of
inc-ec-admin-store-orders-modify-save.php
and
inc-ec-admin-store-orders-modify.php
It may rule them two sources out.

Also anychance you could email me a copy of
inc-cs-admin-stats_referrals.php
and
inc-cs-admin-stats_pages.php
for that php5 problem
I have downloaded the new FlexCMS however
it would save me having to create a new db just to get those two files.
many thanks
Rory
 
DCSun
Administrator



Posts: 625
 
December 7, 2009 @ 7:35pm
Rory,

You can get those and any other files you need from the Upgrade package on the Download page

David


FlexCMS v3.2 Has Been Released!
 
Rory


Posts: 30
 
December 8, 2009 @ 10:57am
Downloaded the upgrade files
uploaded the two files for the stats php5 problem & now get
Fatal error: Call to undefined function GetTimestamp() in /hermes/bosweb/web285/b2858/apo.uzayke/mydivision.co.uk/inc-cs-admin-stats_referrals.php on line 30
and
Fatal error: Call to undefined function GetTimestamp() in /hermes/bosweb/web285/b2858/apo.uzayke/mydivision.co.uk/inc-cs-admin-stats_pages.php on line 276

Did the same for the store and when I clicked on the button to say payment has been received this came up
Table 'flexicms.ec-Discounts' doesn't exist

tried uploading all the store files and still got that message.
I've re-uploaded the old files so I am back at square 1.
any ideas?
cheers Rory

 

Last Edit: December 8, 2009 @ 11:02am by Rory
DCSun
Administrator



Posts: 625
 
December 8, 2009 @ 11:08am
Well you're taking bits and pieces from different versions so you're bound to run into problems like that.

Your stats errors are due to the GetTimestamp() function being missing in the index.php file. Look through the new version of index.php and grab that and add it to the one you're using.

The ec-Discounts table is one of several new tables added to the eCommerce package. You can look through the upgrade.php file and pick out the database formats from there, or perform a full install elsewhere and make the appropriate changes and additions.


David


FlexCMS v3.2 Has Been Released!
 
Rory


Posts: 30
 
December 14, 2009 @ 5:59am
I have added the missing table ec-Discounts (didn't notice any other new ones starting ec- ) to the db and when I click on Mark order Recieved or Shipped I now get

Fatal error: Call to undefined function GetTimestamp() in /hermes/bosweb/web285/b2858/apo.uzayke/mydivision.co.uk/inc-ec-admin-store-orders-modify.php on line 191

I did take this section and added it to the index.php file I am using,


// ====================================================

// Set up the timezone offset if not already set from db
if ($Settings['TimezoneOffset'] == '') {
$Settings['TimezoneOffset'] = (date('Z')/60/60);
//if (date('I') == 1) {
// $Settings['TimezoneOffset']--;
//}
}
else {
if (date('I') == 1) {
$Settings['TimezoneOffset']++;
}
}

function GetTimestamp() {
Global $Settings;
$ServerToGMT = (date('Z')/60/60);
$ServerDifference = ($Settings['TimezoneOffset']-$ServerToGMT);

return (time()+($ServerDifference*60*60));
}

// ================================================

Have I missed something? Is there something else I needed to add to the index file?
many thanks
 

Last Edit: December 14, 2009 @ 6:02am by Rory
DCSun
Administrator



Posts: 625
 
December 14, 2009 @ 12:13pm
Rory,

That is the GetTimestamp() function it was missing.

There's a big block of code from lines 685-1335 and 2186-2303 that you'll want to verify is in there.

There will probably be a number of things, it was a fairly significant release that included a number of fixes and new features.


David


FlexCMS v3.2 Has Been Released!
 
Rory


Posts: 30
 
Happy New YearJanuary 5, 2010 @ 11:48am
Hi David
Hope you had a good xmas and wish you all the best for 2010.

I seem to be back at sqaure 1 again, after all the changes. I added the lines 685-1335 and 2186-2303 to my index file and the order section is back to how it was, doing everything it should except sending those two e-mails

"Notify Customer that payment has been received."
and
"Notify Customer that order has been shipped."

It seems no more timestamp probs for the order section.

However in the stats section
I tried uploading the two files for the stats errors and they both had the timestamp problem, even uploaded all the stats files and then they all didn't work, again mainly due to the timestamp with one for a new table missing.
I have re-uploaded the old stats files so only the two are not working as yet.
As I said before these two are not a priority but I would like the e-mail sending sorted.

Also can you now change the licence from .co.uk to .com please

many thanks
Rory
 
DCSun
Administrator



Posts: 625
 
January 5, 2010 @ 8:39pm
Rory,

Thanks, happy new year to you as well.

I've updated your license to the .com URL now, you can grab the new license key from your Manage Licenses page. Then go to your site's Control Panel > Modify Advanced Site Settings page and click "Click Here to Modify the Base URL".

I suspect you're going to continue having email problems with the way your server is currently configured. Most of the FlexCMS emails are going to be moving to an HTML format in the near future to make them look more personalized and professional, and your account doesn't seem to like the mixed content modes that are required for them. Do you have SMTP available? Talk to your host if you're not sure. That's another option we've looked at adding to FlexCMS for some time, and no promises but we might be able to put something together for you to try that with.


David


FlexCMS v3.2 Has Been Released!
 
Rory


Posts: 30
 
January 6, 2010 @ 7:19am
Hi Dave
I have entered the new key as directed and I am now awaiting the changes of Named Servers to kick in for the full change over to take effect.

I have spoken to my son who tells me our hosting (apollo) does have sendmail (SMTP) available.

cheers Rory
 
Rory


Posts: 30
 
January 8, 2010 @ 9:30am
Glad to say the change over to .com is all done
minor glitch with the sessions not being remembered out side of flex but seems to be back to normal now.
Await the info on the email prob
cheers
Rory
 
DCSun
Administrator



Posts: 625
 
January 8, 2010 @ 12:39pm
That's normal behaviour rather than a glitch. Stored passwords are cookie based, and cookies go with a domain name. Technically they're still stored, but the new domain can't access the old domain's cookies. Otherwise you could set something up to pull all the user's cookies and that would be all sorts of information.

David


FlexCMS v3.2 Has Been Released!
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.07293 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS