Shopping cart - Page 19 Shopping cart - Page 19
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Shopping cart

Started by Stramm, June 04, 2006, 09:02:32 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Stramm

from the first post in this very thread
QuoteNew version (1.3 uploaded 10/07/2006)
- added per album settings, in the shop config you can browse through the existing albums and set different prices. These override the global configuration. Also you can disable to show the shop for a certain album (checkbox).
- If you set in the per album settings the price for a item to 0, then it won't display anymore in the shop
- the order admin shows now the filename too

pyrosteve

 :D Thank you! will give it a whirl now

DesMas

@ Stramm

I manaeged to find out the problem for the missing data in the admin area (missing profile Link and email).
Well I by myself was wrong with the idea of mixed ID's ... got mixed up by myself while browsing the tables... :P

Well the reason for this problem on a bridged shop is, that the colnames are hardcoded in the photosop_admin.php around line 380ff
this works fine in the original cpg, but when the names change due bridge use, the bridge data should be used:

old code:
while($i=mysql_fetch_array($result))
{
$user_name[] = $i['user_name'];
$user_email[] = $i['user_email'];
$this_id[] = $i['id'];
$oid[] = $i['oid'];
$uid_tmp[] = $i['uid'];
$quantity[] = $i['quantity'];
$price[] = $i['price'];
$otime[] = $i['otime'];
$status[] = $i['status'];
$aktive[] = $i['aktive'];
}


new code
while($i=mysql_fetch_array($result))
{
$user_name[] = $i[$udb_var['field']['username']];
$user_email[] = $i[$udb_var['field']['email']];
$this_id[] = $i['id'];
$oid[] = $i['oid'];
$uid_tmp[] = $i['uid'];
$quantity[] = $i['quantity'];
$price[] = $i['price'];
$otime[] = $i['otime'];
$status[] = $i['status'];
$aktive[] = $i['aktive'];
}


user_name and user_email Array were filled up with non existing datas... this could never work :P
Maybe u integrate this into the next update, because it may come up someday again in another bridged system.

Stramm

thanks for this fix... it def will go into the next update ;)

Zeder

Hello,
Where would I change the USD to CND funds?
Also, is there a way to add a Tax line before the Total?  I have to charge GST in Canada, 6%.
Lastly is there a link to send this to Paypal.
Cheers,
Z

Stramm

everything answered in this thread

iframe

#366
Hey Stramm!

At first, great update.

One question about the Email-notification.
This is great, the User can look up his order in his Email.

But i want one more thing:

How can i add the "filename" of the picture to the email.

I found in photo_shop_checkout this line:

$out['text'].= sprintf("%10.10s\t", $item_id['pid']).sprintf("%15.15s\t", $SHOP_CONFIG[$item_id['id']]['name']).sprintf("%10.10s\t", $item_id['amount'])
.sprintf("%10.10s\t", $item_id['filename']).sprintf("%15.15s\n",$lang_photoshop['USD'].' '.$price);



This will show in the Email:

ID    Typ        Amount    price complete

3      Photo         1            EUR  5.00


To add the "filename", i thought, to add this line will be correct:

.sprintf("%10.10s\t", $item_id['filename'])

but it wont work. What´s wrong?



        EDIT:

okay, i found a way, but not final:

in photo_shop_checkout:

at first, add the title "filename": 

$lang_photoshop['filename'])

a view lines among this code to show the filename of the picture:


.sprintf("%15.15s\t", $select_columns['filename'])


but in the email i see only one letter. the first letter of the filename. why?

Thx

Stramm


iframe

Great! Great! Great!

Thx a lot!

Troul Hawk

#369
Stramm, for some reason I am unable to resolve your sandbox, and would like to get a copy of 1.3.5

Is there a link to download it from Coppermine's web?

Thanks!

edit: Found it along with the plugin_pack.  Thanks for your time!

Stramm

You shouldn't use the one from the plugin pack cause it's outdated. Use the one attached to the first post in this thread.

tyio

#371
Very nice plugin because of the nice cart design , congrats :)



I ask you for a information about the coding :)


i would like to bypass the register form, because i have cancel the registration on my website. And so, when i put "pay with paypal buton", i would like to put in the order spec,  the information the buyer put (mean the n° of the picture, and the details), and not the order number :)

It's too because don't want to show the buyer the number of order i did, and too because my webhoster doesn't allow me to send mail .... So, i know paypal service is ok (and i only send .zip files, no ships :)



Thanks :)

EDIT : and what about adding some other type (more than "CD, shipping, picture") ??

:)

Prowler9

Is there a way to change the TYPE of item being sold from photo to something else?

kiama

#373
problem solved

DesMas

Hi Stramm, as u may remember i used your shop mod in a bridged cpg_joomla system and namaged several changes to the code :P

Well at least I made some changes that may be good for the usability and maybe u take them over into one of the next versions.
Alos I dont want to hold back changes I made, because its your plugin and u should know what others do with it :P

Situation as it was:
normally u navigate in the admin area by click on the order and another click on the order details to get back to the overview of all orders.

I changes this, by removin the onclick event and set it on a real visible linktext/button:

for the order overview:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.vmm-is.de%2Ffiles%2Fcpg_shop%2FListe_eingegangene_Bestellungen.jpg&hash=351a4c0f0f0bb625d4a5c8a18266095800ad4889)

replaced:

echo <<<EOT
<tr>
<td class="alt1 smallfont" width="50px">
v<img src="$icon_type1[$k]" alt="" border="0" /><br>
p<img src="$icon_type2[$k]" alt="" border="0" /><br>
s<img src="$icon_type3[$k]" alt="" border="0" />
</td>
<td class="alt2">&nbsp;<a href="profile.php?uid={$uid_tmp[$k]}">{$user_name[$k]}</a>&nbsp;</td>
<td class="alt1Active" width="75%">

<div>
<span style="float:right" class="smallfont">Date: {$thisdate} - {$thistime}</span>
<div style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&amp;oid={$oid[$k]}&amp;box={$box}';">
{$lang_photoshop_admin['noitems']}: {$quantity[$k]} <input type="button" value="details" name="details" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&amp;oid={$oid[$k]}&amp;box={$box}';"/><br />
{$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']} - {$lang_photoshop_admin['incl_ship']}
</div>
</div>
<div class="smallfont">
<span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
<span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
<span style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&amp;oid={$oid[$k]}&amp;box={$box}';">{$lang_photoshop_admin['order_id']}: {$oid[$k]}&nbsp;&nbsp;- &nbsp;&nbsp;{$lang_photoshop_admin['user_id']}: {$uid_tmp[$k]}</span>
</div>

</td>
<td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="orders[{$oid[$k]}]" value="{$oid[$k]}" /></td>
</tr>

EOT;

width:

    echo <<<EOT
        <tr>
        <td class="alt1 smallfont" width="50px">
        v<img src="$icon_type1[$k]" alt="" border="0" /><br>
        p<img src="$icon_type2[$k]" alt="" border="0" /><br>
        s<img src="$icon_type3[$k]" alt="" border="0" />
        </td>
        <td class="alt2">&nbsp;<a href="profile.php?uid={$uid_tmp[$k]}">{$user_name[$k]}</a>&nbsp;</td>
        <td class="alt1Active" width="75%">

            <div>
                <span style="float:right" class="smallfont">Date: {$thisdate} - {$thistime}</span>
                <div>
                {$lang_photoshop_admin['noitems']}: {$quantity[$k]} (<a href="index.php?file=photo_shop/photo_shop_admin&amp;oid={$oid[$k]}&amp;box={$box}';" target="_self">{$lang_photoshop['details']}</a>)<br />
                {$lang_photoshop_admin['volume']}: {$price[$k]}{$lang_photoshop_admin['usd']} - {$lang_photoshop_admin['incl_ship']}
                </div>
            </div>
            <div class="smallfont">
                <span style="float:right;"><a href="index.php?file=photo_shop/photo_shop_zip&oid={$oid[$k]}">{$lang_photoshop_admin['download_zip']}</a></span><br>
                <span style="float:right;"><a href="mailto:{$user_email[$k]}">{$user_email[$k]}</a></span>
                <span style="cursor:pointer" onclick="window.location='index.php?file=photo_shop/photo_shop_admin&amp;oid={$oid[$k]}&amp;box={$box}';">{$lang_photoshop_admin['order_id']}: {$oid[$k]}&nbsp;&nbsp;- &nbsp;&nbsp;{$lang_photoshop_admin['user_id']}: {$uid_tmp[$k]}</span>
            </div>

        </td>
        <td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="orders[{$oid[$k]}]" value="{$oid[$k]}" /></td>
    </tr>

EOT;


for the order details (added a new back button):
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.vmm-is.de%2Ffiles%2Fcpg_shop%2FUebersicht_Bestelldetails.jpg&hash=60c1da407f74b866fe24569858a68a2329713c26)

replaced:

echo <<<EOT

<table class=" " cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<thead>
<tr>

<td class="tablef" align="right" colspan="4">
<div class="smallfont">
{$lang_photoshop_admin['SelectedOrders']}
<select name="dowhat_item" class="listbox">
<option value="mark_payed">{$lang_photoshop_admin['mark_payed']}</option>
<option value="mark_unpayed">{$lang_photoshop_admin['mark_unpayed']}</option>
<option value="mark_sent">{$lang_photoshop_admin['mark_sent']}</option>
<option value="mark_unsent">{$lang_photoshop_admin['mark_unsent']}</option>
<option value="delete_orders">{$lang_photoshop_admin['delete']}</option>
</select>
<input type="hidden" name="box" value="{$box}" />
<input type="hidden" name="oid" value="{$oid}" />
<input type="submit" class="button" value="{$lang_photoshop_admin['go']}" />
</div>
</td>
</tr>
    <tr>
              <td colspan="5" style="padding: 0px;">
                      <table width="100%" cellspacing="0" cellpadding="0">
                              <tr>
                                      {$tabs}
                              </tr>
                      </table>
              </td>
    </tr>
</thead>
</table>
</form>
</tr></td></table>


<table class="pms_legend" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><td><img src="{$THEME_DIR}images/s_neg.gif" border="0" alt="" /></td><td class="smallfont">&nbsp;&nbsp;{$lang_photoshop_admin['pos']}</td></tr>
<tr><td><img src="{$THEME_DIR}images/s_pos.gif" border="0" alt="" /></td><td class="smallfont">&nbsp;&nbsp;{$lang_photoshop_admin['neg']}</td></tr>
EOT;


with:

echo <<<EOT

<table class=" " cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<thead>
    <tr>

        <td class="tablef" align="right" colspan="4">
            <input class="button" style="float: left;" type="button" value={$lang_photoshop['back']} onclick="window.location='index.php?file=photo_shop/photo_shop_admin&amp;box={$box}';"/>
            <div class="smallfont">
                {$lang_photoshop_admin['SelectedOrders']}
                <select name="dowhat_item" class="listbox">
                    <option value="mark_payed">{$lang_photoshop_admin['mark_payed']}</option>
                    <option value="mark_unpayed">{$lang_photoshop_admin['mark_unpayed']}</option>
                    <option value="mark_sent">{$lang_photoshop_admin['mark_sent']}</option>
                    <option value="mark_unsent">{$lang_photoshop_admin['mark_unsent']}</option>
                    <option value="delete_orders">{$lang_photoshop_admin['delete']}</option>
                </select>
                <input type="hidden" name="box" value="{$box}" />
                <input type="hidden" name="oid" value="{$oid}" />
                <input type="submit" class="button" value="{$lang_photoshop_admin['go']}" />
            </div>
        </td>
    </tr>
    <tr>
              <td colspan="5" style="padding: 0px;">
                      <table width="100%" cellspacing="0" cellpadding="0">
                              <tr>
                                      {$tabs}
                              </tr>
                      </table>
              </td>
    </tr>
</thead>
</table>
</form>
</tr></td></table>


<table class="pms_legend" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><td><img src="{$THEME_DIR}images/s_neg.gif" border="0" alt="" /></td><td class="smallfont">&nbsp;&nbsp;{$lang_photoshop_admin['pos']}</td></tr>
<tr><td><img src="{$THEME_DIR}images/s_pos.gif" border="0" alt="" /></td><td class="smallfont">&nbsp;&nbsp;{$lang_photoshop_admin['neg']}</td></tr>
EOT;


new in $lang_photoshop for this:
  'catalog'     => 'Katalog',
  'imagename'   => 'Dateiname',
  'back'        => 'zurück',
  'details'     => 'details',


well those changes are only marginal, but I think they bring in a good improvement for the usability :P

I also added the User email adress to the mail sent to the admin and blew up the info table send in the mail to this:

   Item ID                      Dateiname     Format     Anzahl           Preis                                       Katalog

         1                    Ina_Reimers        4x6          1       EUR  2.00                      Bilder/TestVA/Testalbum/

         5         Siegerehrung_E-Dressur        4x6          1       EUR  2.00                      Bilder/TestVA/Testalbum/

(I dont describe it, because had been done already in another thread)

also I changed the table displayed for the users in the checkout to:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.vmm-is.de%2Ffiles%2Fcpg_shop%2FAufstellung_Bestellung_vor_OK.jpg&hash=d2667f4816631d8eb03ef12b7b5932a958a6f409)

Maybe u think, some of those changes are worth it to be taken over into the next code review :P

jesphoto

Will I be able to sell zipped photos?.I have a oscommerce running, but I am tied of so many bugs.

Stramm

I'm not sure what you mean with zipped photos... but try and you'll see

Freder

I think it means 'compressed with zip'. There is no such option right now, automatic that is: you can customize the 'add to CD' option. In CPG there is the option of downloading favourites in a zip archive, but it's not connected to the shop (yet?).

BTW Is there an option to enable some items locally (per album) and have them disabled in all the rest? Will setting the global price to 0 work that way?

Stramm

The admin can download orders as zip...

you can disable single albums but not items in an album

krp

Hi Stramm,

can i change the place of menu for "add" button and box for prices with sizes. In my gallery it stay on the right side and make white frame around the picture very big(i use 500pix pictures), when i use black background from theme. Maybe if it stay in the middle?

   http://www.sportnitanci.com/webga/displayimage-3393.html

Thank you!

Kalin