Jump to content
Sign in to follow this  
Jack_mcs

PostIt

Recommended Posts

This is the support thread for the PostIt conribution (see my signature).

 

This contribution allows you to place a PostIt style note (the image can be changed to anything you like) with text, images and links on it. This provides a very unique and eye-catching way to focus your visitors attention.

 

The contents can be changed dynamically so anything in your database can be displayed. For example, you could display the customers name with special notes meant just for him or her.

 

See the instructions for a link to an example.

 

Jack

Share this post


Link to post
Share on other sites

I just uploaded a new version. I added the code to show how to randomize the displayed text. I used customer information as an example but you may not want to do that in a live shop.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack

 

Your contribution does not work, I do everything you said in your install txt file and the post it message don't appear. I use oscommerce 2.2 and STS template. You sure all the thing you said on the txt file is ok ?


John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

It works fine for me. If you followed all of the instructions, including the note about IE, and it doesn't work, then it may be due to STS not allowing the javascript to be seen. I can't help you with that since I don't use STS. You will need to ask on the STS support thread.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

Ok, forget STS, I want to do the same thing as you do on your site. you put Post it to display in the index page, right ? Explain to me how to do it because when I try to display it in includes/languages/english/index.php , it's not work too.


John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

That's the wrong index.php file. You need to edit the one in your root directory.

 

Jack

Share this post


Link to post
Share on other sites

I just installed that, took all of about 3 minutes. Pic was a lil ugly but very good job on an easy contrib that could have endless uses. =)


Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Share this post


Link to post
Share on other sites

Thank you,

 

It work now, but you don't specify in the install txt to edit the catalog/index.php, it's why I don't get it. Good contribution but I can't use it because it's not multilingual. Thank's anyway.


John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

Wherever you have the code for the note, place this code before it

 <?php if (!tep_session_is_registered('customer_id')) { ?>

and place this afer it

 <?php  }  ?>

I haven't tried it but I think it will work.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
Wherever you have the code for the note, place this code before it
 <?php if (!tep_session_is_registered('customer_id')) { ?>

and place this afer it

 <?php  }  ?>

I haven't tried it but I think it will work.

 

Jack

 

 

I placed the code <td><?php include(DIR_WS_MODULES . FILENAME_POSTIT); ?></td>

in my index thats where to make the change.

 

Thanks for the fast response :thumbsup:

Share this post


Link to post
Share on other sites
I placed the code <td><?php include(DIR_WS_MODULES . FILENAME_POSTIT); ?></td>

in my index thats where to make the change.

 

Thanks for the fast response :thumbsup:

 

 

I keep geting a random customer with date of birth from my database I would like to generate a random note not sure how this is done

Thank You!

Edited by culturebee

Share this post


Link to post
Share on other sites

You would need to create a table of notes and then load them in the includes/modules.postit.php file.

 

Jack

Share this post


Link to post
Share on other sites
You would need to create a table of notes and then load them in the includes/modules.postit.php file.

 

Jack

 

Can You please give an example I'm confuse on this part

 

// $text = 'Some random text loaded from your database goes here. It can be ';

// $text .= 'as long as you want. The code will limit how much will be displayed.';

 

 

 

 

That code for registered customers did not work for me, when not loged on I get random Customers from my data base, and when loged in I do not see the note box, I have a field in my customer Table called customers notes I will like to generate or update a note fo a customer when they log on to there account is this possible or is it only for comments.

Thank You.

Share this post


Link to post
Share on other sites

There is a database query string in that file for the customers table so all you need to do is to add your field, customers_notes (or whatever it is). Then where it says

// $text = 'Some random text loaded from your database goes here. It can be ';

change it to

$text = $random_text['customers_notes'];

 

Jack

Share this post


Link to post
Share on other sites
There is a database query string in that file for the customers table so all you need to do is to add your field, customers_notes (or whatever it is). Then where it says
// $text = 'Some random text loaded from your database goes here. It can be ';

change it to

$text = $random_text['customers_notes'];

 

Jack

 

 

 

Thanks a lot Jack make's more sense now I will play arround with it Thanks a lot Bossman And by the way take a break You deserve and injoy the holiday's and HAPPY NEW YEAR!!!

Share this post


Link to post
Share on other sites

A new version has been uploaded. The main changes are:

 

- Changed much of the code to make it more flexible

- Added admin controls

- Added language compatibility

- Added option to switch to different displays

 

Jack

Share this post


Link to post
Share on other sites

A link is provided in my profile.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
That's the wrong index.php file. You need to edit the one in your root directory.

 

Jack

 

Jack, I just downloaded PostIt V1.2 and in the install instructions it is stated:

10) There are two ways to have the box show up on a page. The better way,

in my opinion, is to use the first method since it allows the box to

fit it with the text on the page. To use it this way, in

catalog/includes/languages/english/index.php,

 

I think it was this that got the previous poster confused regarding of which file to edit.

Share this post


Link to post
Share on other sites

I doubt it since that instruction was just added in this version.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack. I followed your instuction all the way to the end, and I have no idea where to place the last set of code in the index.php file. Please help. Thank you.

Share this post


Link to post
Share on other sites

It depends on where you want it to appear and which index file you are editing. Let's say your english/index.php file has this

define('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>.

You could change it to

define('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any 
 <div  class="mainText" id="postit_img">
  <img src="images/' . $postit['image'] . '" alt="" title="" border="0" align="left" vspace="5" hspace="5">
  <div id="postit_top">'	. $title . '</div> 
  <div id="postit_middle">' . $text . '</div> 
  <div id="postit_bottom">' . $more . '</div> 
 </div> 
products purchased will not be delivered nor will the customer be billed</b>.

Assuming oyu have made the other edits to that file as mentioned in the instructions, the postit would appear within that text. If you move the code I add to the begginning, like this

define('TEXT_MAIN', '
 <div  class="mainText" id="postit_img">
  <img src="images/' . $postit['image'] . '" alt="" title="" border="0" align="left" vspace="5" hspace="5">
  <div id="postit_top">'	. $title . '</div> 
  <div id="postit_middle">' . $text . '</div> 
  <div id="postit_bottom">' . $more . '</div> 
 </div> 
This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>.

then the postit would be before the text. Of course, with just a few words like this example, it wouldn't make much difference.

 

Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×