Categories > TinyButStrong general >

Return address from shopping cart

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: TREVOR
Date: 2007-02-09
Time: 01:22

Return address from shopping cart

Each of my blocks has a "buy-me" button with a return address to get back to the same page. Is it possible to come back to the block where the button was pushed rather than the page top? It is important on a long page.

         <td align="center" valign="top" >
    <img src=../images/[blk_1.IMAGE]><br />
    [blk_1.DESCRIPTION;block=td]<br />
    [blk_1.STOCK_CODE]&nbsp;&nbsp;&nbsp;[blk_1.SALES_PRICE;frm='£000.00']<br/>
    <a href="http://ww9.aitsafe.com/cf/add.cfm?userid=B059001&amp;product=[blk_1.STOCK_CODE]++[blk_1.DESCRIPTION]&amp;price=[blk_1.SALES_PRICE]&amp;units=[blk_1.UNITS]&amp;qty=[blk_1.QTY]&amp;return=http://ccgi.handsel.plus.com//fash0107/tiaras/f_tiaras.php">
        <img border="0" id="img[blk_1.STOCK_CODE]" src="../buttonB1.jpg" height="15" width="50" alt="BUY ME" onmouseover="FP_swapImg(1,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB2.jpg')" style="fp-btn: Soft Capsule 1; fp-proportional: 0; fp-orig: 0" title="BUY ME"></a>
    </td>

Very pleased with everything else I am doing with TBS.

best wishes...Trevor
By: TomH
Date: 2007-02-09
Time: 02:06

Re: Return address from shopping cart

Hi,
Would the simple HTML "ADDRESS" tag work in this case?

I'm not too sure of your id for each block - but if I assumed that the STOCK_CODE coud be used for that.

Then you could add an "ADDDRESS" target label with the block id and also add onto the URL for the " ?return= " val with the block id as well

Something like...

<td align="center" valign="top" >

<address id="[blk_1.STOCK_CODE]" ></address>

    <img src=../images/[blk_1.IMAGE]><br />
    [blk_1.DESCRIPTION;block=td]<br />
    [blk_1.STOCK_CODE]&nbsp;&nbsp;&nbsp;[blk_1.SALES_PRICE;frm='£000.00']<br/>
    <a href="http://ww9.aitsafe.com/cf/add.cfm?userid=B059001&amp;product=[blk_1.STOCK_CODE]++[blk_1.DESCRIPTION]&amp;price=[blk_1.SALES_PRICE]&amp;units=[blk_1.UNITS]&amp;qty=[blk_1.QTY]&amp;return=http://ccgi.handsel.plus.com//fash0107/tiaras/f_tiaras.php#[blk_1.STOCK_CODE]">
  <img border="0" id="img[blk_1.STOCK_CODE]" src="../buttonB1.jpg" height="15" width="50" alt="BUY ME" onmouseover="FP_swapImg(1,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB2.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB1.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB3.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img[blk_1.STOCK_CODE]',/*url*/'../buttonB2.jpg')" style="fp-btn: Soft Capsule 1; fp-proportional: 0; fp-orig: 0" title="BUY ME"></a>
    </td>

HTH,

TomH
By: TREVOR
Date: 2007-02-09
Time: 13:57

Re: Return address from shopping cart

Thank you very much TomH - that has solved my problem.

I put an id in each table cell
id="blk_1.STOCK_CODE"
and then finished off my return address with
...../tiaras/f_tiaras.php%23[blk_1.STOCK_CODE] 
and then it works!

I already knew I could use a return address of
...../tiaras/f_tiaras.html%23[blk_1.STOCK_CODE] 
but I did not realise I could do the same with a php file ... I am sure it is there in the PHP instructions somewhere - but you have saved me hours of research so again  "THANK YOU VERY MUCH"

best wishes...trevor