[ic] Building a mall - detailed Question

Murray Gibbins Murray@scotweb.ltd.uk
Mon, 18 Dec 2000 16:23:12 +0000

"Lattus, Ronald" wrote:
> Hello Murray!
> What we need is the same Greg Cope asked for:
> Different produkt lists (~product catalogs) which have there own admin-ui
> (so that the list can be edited by different merchants), but share the
> customer-ui, the basket and so on (so that for the customer they apear as
> one themed store).

> What's wrong?


When i made my mall I didn't use "SubCatalog" all my ctalogs have different URLs
and are joined together by symbolic links between the session files to one
master session files. Then I added some specialized perl code to cope with item
atributes. All this has been posted to the list a while ago. Most of my
databases are imported into minivend.cfg useing postgres to save memory. I then
wrote my own set of tools to manipulate the minvend.cfg and catalog.cfg files so
I could add and subtract shops at will. 

Shipping was a problem so I made my own shipping server which runs on a separted
machine. See http://www.morpheux.org/minivend/shipd/shipd.html for more info.

This save a lot of memory/processor time and allows me to centrally administer

Also I had to pathc mivend 4.0.4a to allow for more catalogs in CommonAdjust.


I've also writen some modules of minvend pages. ie files that can be slotted
into a page of html using "include" to provide eg a "mall total", i found it
usefull when creating many shops as it heplped debuging see below...

[comment]New Mall total stuff[/comment]

[if  explicit][condition]if(! defined($Scratch->{mall_equate})){return 1;}else{r
eturn 0}[/condition][set mall_equate][data table="[scratch present_cart]_config"
 field="config" key="MALL_EQUATE"][/set][/if]

[if  term="[scratch mall_equate]" op="eq" compare="1"]

        [comment] Check to see if "last_cart" has been set if not set it[/commen

        [set name="last_cart" interpolate=1][perl]$Scratch->{"cart-loop"} =~ /\b
(\w*?)$/; return $1;[/perl][/set]
        [set name="first_cart" interpolate=1][perl]if($Scratch->{"cart-loop"} !~
 /\s/){return $Scratch->{"cart-loop"}}else{$Scratch->{"cart-loop"} =~ /^(.*?)\s/
; return $1;}[/perl][/set]
        [comment]If we are the first cart set mall total to zero[/comment]
        [if term="[scratch present_cart]" op="eq" compare="[scratch first_cart]"
                [set mall_total]0[/set]
                [set mall_total_new]0[/set]

        [comment] Check to see if "mall_total" has been defined if not set it to
 zero [/comment]

        if(! exists($Scratch->{mall_total})){
           $Scratch->{mall_total} = 0;
        elsif(! defined($Scratch->{mall_total})){
           $Scratch->{mall_total} = 0;
        [comment] add the total of the basket to the running mall total [/commen
        [set name="mall_total_new" interpolate=1][total-cost noformat=1][/set]

        my $tmp = $Scratch->{mall_total} + $Scratch->{mall_total_new};
        $Scratch->{mall_total} = $tmp;
        return ;

        [if term="[scratch present_cart]" op="eq" compare="[scratch last_cart]"]

                <tr><td colspan="3" align="right" valign="top"><font size="+1"><
b>Mall Total</b></font></td>
                <td align="right" valign="top"><font size="+1" color="[data tabl
e='[scratch present_cart]_company' field='config' key='debtcolor']"><b>[currency
 convert=1][calc]$Scratch->{mall_total}[/calc][/currency]</b></font><BR clear="a
                <tr><td colspan="3" align="right" valign="top"><font size="-1">M
all Total Converted to [scratch currency]</font></td><td align="right"><font siz

                [set Interpolate=1 name="rate"][data Interpolate=1 table="[scrat
ch present_cart]_currencies" field="multiply" key="[scratch currency]"][/set]

                [show_currency Interpolate="1" price="[scratch name='mall_total'
 interpolate=1]" rate="[scratch rate]" currency="[scratch currency]" name="" ]</
font><BR clear="all"><hr>


  \__/    Murray Gibbins             murray@scotweb.ltd.uk
  /  \    Programmer
_ \__/ _  ================================================
\\ || //  Scotweb Limited,             info@scotweb.ltd.uk
 \\||//   13a Albert Terrace,    http://www.scotweb.ltd.uk
  \||/    Edinburgh EH10 5EA   Tel: +44 (0)  131 270 82 33
   ||     Scotland. Europe.    Fax: +44 (0) 7020  93 49 04