Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Send as Postcard expert needed


Salvo

Recommended Posts

Hi all,

 

I am trying to make a "send as a post card lagnagues supported" contribution for osc adapting some script...

 

All is working fine, image with all details shown and sent to email given.

 

but when the card "the details are inserted in a table" is viewed, all the details are there less the image... the image can not be viewed because the last link (image name is missing).

 

if someone EXPERT like to have a look at it, I will forward a zip file (only a few files) with instruction.

 

installation takes a few minutes and easy.

 

Salvo

Link to comment
Share on other sites

Ops! sorry for posting again... (no edit facilities) :-)

 

Maybe he/she doesn't have to be expert to resolve this little problem.

 

its me that I am still learning and not be able to resolve it.

 

Anybody with an better understanding than me in php and osc could resolve it with ease...

 

Thanks again

 

Sal

Link to comment
Share on other sites

I see that there is not much request for a postcard module added to the product images. So I presume that I must try to resolve the problem on my own in the best way...

Here we go:

 

Using the popup image system, I retrieve the image in a pop up window as follow.

 

$pod_id = $HTTP_GET_VARS['pID'];

$products_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $pro_id . "'");

$products_values = tep_db_fetch_array($products_query);

$image = DIR_WS_IMAGES . $products_values["products_image"];

 

all works fine, the image shows up in the window and below the image I have input fields that works fine and therefore I don't put them here..

 

Now, the $image above translates as follow:

 

DIR_WS_IMAGES = image/ //which is the directory where the images are located.

 

$products_values["products_image"]; = // this translate into ie. image.gif

 

I like to insert $image into a field (new table) as follow at moment

 

$insert = "INSERT into $table (emailto, emailfrom, nameto, namefrom, image, comment, sessionID, seencard)";

$insert .="VALUES ('$email[to]', '$email[from]', '$name[to]', '$name[from]', '$image',";

$insert .="'$comment', '$sessionID', 'false')";

 

$result = mysql_query($insert);

if($result){

$cardnumber =mysql_insert_id();

 

 

all the fields are inserted into the respected fields correctly... only the $image is NOT inserted in full..

 

the only thing that is inserted is:

DIR_WS_IMAGES = image/ //which is the directory where the images are located.

 

Is part:

$products_values["products_image"]; = // this translate into ie. image.gif

 

is NOT inserted... WHY? I need the image name into the field in order to retrieve it to show the image....

 

can someone help in solving this mistery?

Salvo

 

PS> I am sorry if I am persistend on this one. but it would be my first contribution

Link to comment
Share on other sites

Hi Salvo,

 

I reviewed your codes but mysql syntax is really out of my boundaries. So I am just leaving you this notice to say that your contribution will be meaningful to my site (still under development) which sells over a hundred thousand oil paintings.

 

Chow from Hong Kong

Link to comment
Share on other sites

I would also be interested in this mod, but like the last post, I don't know much about code yet. Please let us know if you get this resolved.

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

  • 1 month later...

Yes, I would need help...

 

I just left it on the side becuse I coundn't make it work...

 

If you are good in php ( it might be just an easy work with someone with some good knowleadge in php) which I don't have, and you like it to finish it, I can post you a zip with files of what I have.......

 

Thanks

 

Salvo

Link to comment
Share on other sites

If I read this correctly....everything is working except for the insert?

 

Are the rest of the fields being inserted correctly?

 

Or is it just the image field that is not being inserted?

 

Jon.

Link to comment
Share on other sites

I just read through it again....

 

Why do you need to put the DIR_WS_IMAGES in to the database? This shouldn't be necessary, you should only need to store the actual image file name.

 

Jon.

Link to comment
Share on other sites

  • 5 months later...

beautfulllll

it works nicely.............

 

I had left the progect becauce I coundn't make it work

 

I would appreciate if you could send the code me or upload it here if you like... Please

 

Thanks

 

Salvo

Link to comment
Share on other sites

I can't translate though, so if it isn't in English perhaps someone can translate it so it can be posted as a contribution?

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

When you click on an image there opens a popup-window with this image.

Instead of this you import this image into a postcard-program and send the image to a friend, customer...

 

1. Have a look at www.riedborn-apotheke.de/catalog to see if it is useful

2. Install a postcard-program like postcard-direct (pd)

(http://www.ginini.com/software/postcard-direct)

3. Add your domain into the file cgi-bin/pd/admin/remotesites.txt

 

4. Make some changes inside catalog/product_info.php:

 

--> change function popupWindow(url):

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<!-- BOF Einbau von Postcard direct - changed: scrollbars, width, height //-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resiza

ble=yes,copyhistory=no,width=800,height=600,screenX=150,screenY=150,top=150,left=

150')

}

//--></script>

<!-- EOF Einbau von Postcard direct //-->

</head>

 

 

--> change the call of this function about line 100:

 

<!-- BOF use of Postcard direct - don't forget to change the function popupWindow: scrollbars, width, height //-->

<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow('/cgi-bin/pd/pd.cgi?image=' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '&title=' . $product_info['products_name'] . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="/cgi-bin/pd/pd.cgi?image=' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

<!-- EOF use of Postcard direct //-->

 

----------

 

Wolfgang

Link to comment
Share on other sites

I am very familiar with Postcard Direct and do not want to use cgi solutions with my php stores.

 

Thanks for the update though, guess we will keep looking!

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...