Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Little Tip Trick For Newcomers


matrix2223

Recommended Posts

Posted

Here is some cool code that one could add to their products discription if they have one of the fallowing: accessories that customers could purchase by clicking on a link in your discription, or any of the sort.

 

<br><tr><td align="center"><b>Accessories for this Item:</b><tr><td valign="center" align="center" width="50">
<a href="/your_url.php"><img src="/images/image.JPG" align="center" border="0" width="50"><font color="blue"><u>Other Products Name</u></font></a><br><font color="blue"><span class="boldred"><b>$Your Price</b></span></font></a></td><td valign="center"><a href="/your_url.php"></a>

 

This will give you an image link to another product with text that is also a link

 

To view this code Click Here I only wished that something like this could have been around when I first started since most of my products have tons of html in it well maybe not tons but you get the idea

 

Have fun with it

 

Eric

  • 3 weeks later...
Posted

Doesn't that lose the session id if someone clicks on it with cookies turned off or am I missing something?

Posted

I havent yet seen it loose the session ids. All this is, is a link in the products discription. That goes to another product.

Posted

Why not just use the Master products Contribution and rename it 'Accessories'. Wouldn't that work better? You wouldn't have to hard code the links.

 

These types of modules show an infobox with associated (ie. Accessories) items related to a product ... and can handle multiple instances.

 

There are other similar contributions to Master Products also.

Posted

True, However if you only have a hand full of products that have Accessories then taking the time to add a contrib would be kinda pointless I think. But, that is a very good idea if one has a lot of products that would have accessories to go with it.

 

This was ment to aid people who only have a few like I do.

 

Eric

  • 2 weeks later...
Posted

If anyone was signed in and/or had items in their basket - I dont see how the sessions would be passed over with a link like you mentioned.

 

I think there is a proper way to insert the links in product info etc that will keep the sessions.

Posted

I like this and want to say hey thanks putting this info up!!!

 

A couple of questions.....

 

I can't get the image to be under the text Accessories for this Item, it's over on the left side?

 

How do you implement a hover feature?

 

I keep adding <br> between my product info and this but there dosen't seem to be any spaces happening?

 

Sorry for the questions......

 

Nigelman :thumbsup:

Posted
If anyone was signed in and/or had items in their basket - I dont see how the sessions would be passed over with a link like you mentioned.

 

I think there is a proper way to insert the links in product info etc that will keep the sessions.

 

well, as long as the session cookie is accepted, those links work just fine, it is when cookies cannot be set that you will lose your session this way.

Treasurer MFC

Posted

not only you lose the session if cookies are off, but you still have to pass the products/categories ids in with the link and you have no control over it. If you delete/move products/categories you have to go around each products description and change the identifiers.

 

Links should generated by the tep_href_link function.

Posted
well, as long as the session cookie is accepted, those links work just fine, it is when cookies cannot be set that you will lose your session this way.

 

True, I just wanted to add that for all of those who have went to the link and view other products the session id stayed the same and this is with cookies off.

Posted
not only you lose the session if cookies are off, but you still have to pass the products/categories ids in with the link and you have no control over it. If you delete/move products/categories you have to go around each products description and change the identifiers.

 

Links should generated by the tep_href_link function.

 

 

I tried the tep_href_link function with errors either I was missing something in the code or it doesnt work.

 

Also I just want to add that When a user uses Firefox with normal setting (such as myself) I always get the cookie usage.php page whats the way around this?

 

Eric

Posted

sorry I couldnt eidt the post agian.

 

I stand corrected by my last statement of cookie usage everything works fine.

 

Eric

Posted

Here is another little product discription tip.

 

This is not to be confused with compair products side by side. That contrib is for use when you have both products. This is for when you have 1 product but compairing it to another. Also, I think it makes it, better this way as well.

 

What this does is put tables in order to compair what ur product does and what the competitors does.

 

in your products discription and this code anywhere you like this is in the middle of mine so you may have to change it slightly.

 

<br>
<table align="center" border="0" cellspacing="1">
<tbody><tr>
<td width="100"></td>
<td style="border: thin solid black;" align="center" width="128"><b>Their Brand</b><br>(1 quart=1 quart)</td>
<td style="border: thin solid black;" align="center" width="128"><b>Your brand</b><br>(concentrated;<br>1 quart=2 gallons)</td>
</tr><tr>
<td style="border: thin solid black;" align="left"><b>Price-per-Ounce</b></td>
<td style="border: thin solid black;" align="center">$0.13</td>
<td style="border: thin solid black;" align="center">$0.03</td>
</tr><tr><td style="border: thin solid black;" align="left"><b>Price-per-Quart</b></td>
<td style="border: thin solid black;" align="center">$4.05</td>
<td class="red" style="border: thin solid black;" align="center"><font color="red">$0.88*</font></td><td>
</td></tr></tbody></table><ul><div class="tiny" style="color: red;" align="center"><i>*Calculated based on amount of cleaner produced per quart.</i></div></ul><br>

 

If I had a descent camera I would post a picture of this but since I dont you can go to the page to view it if you would like. My Webpage

 

For those who may use this you are more than welcome. Im just trying to help out a little for what I do know. As I get more creative with different thigs to make the apperince of the discriptions look better, or cool things one can add Ill post them here.

 

I hope this really does help someone.

 

Eric

Posted

hi

i am not that good at PHP - how do you get the your_url.php? - in my case the url is pretti messy - also not sure how to do the whole linking to the image and price and shopping system.

if you can clarify these issues to me

cheers and thanks for your time

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

 

<br><tr><td align="center"><b>Accessories for this Item:</b><tr><td valign="center" align="center" width="50">
<a href="/your_url.php"><img src="/images/image.JPG" align="center" border="0" width="50"><font color="blue"><u>Other Products Name</u></font></a><br><font color="blue"><span class="boldred"><b>$Your Price</b></span></font></a></td><td valign="center"><a href="/your_url.php"></a>

 

This will give you an image link to another product with text that is also a link

 

To view this code Click Here I only wished that something like this could have been around when I first started since most of my products have tons of html in it well maybe not tons but you get the idea

 

Have fun with it

 

Eric

Posted

I force cookies so I have never experienced this. If you dont force cookies try this:

<tr>
<td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO,
'products_id=23') . '">' . tep_image(DIR_WS_IMAGES . 'your_image.gif', 
'Your title') . '</a>'; ?></td>
</tr>

instead of the <a href="......>

 

What I ment for the your_url.php is the url of your product like:

"/products_id=23.html"

 

Hope this help clear things up a bit,

 

Eric

Posted

Ok, I just tried that myself and couldnt get it to work.

 

If someone knows the way to do this with the tep_href link function (that works, please post).

 

If not the only other way to do it is to force cookies.

Posted
I force cookies so I have never experienced this. If you dont force cookies try this:

<tr>
<td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO,
'products_id=23') . '">' . tep_image(DIR_WS_IMAGES . 'your_image.gif', 
'Your title') . '</a>'; ?></td>
</tr>

instead of the <a href="......>

 

What I ment for the your_url.php is the url of your product like:

"/products_id=23.html"

 

Hope this help clear things up a bit,

 

Eric

 

you cannot put that in your description.

Treasurer MFC

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...