[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] master/slave catalogs - (products & checkout)
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Dave Barr (barrd@cricinfo.com):
>
> Hi MiniVenders,
>
> [Debian 2.2 / MiniVend 4.04]
>
> I'm hoping that someone might be able to help/advise me as to the
> best course of action regarding LARGE numbers of catalogs (in time
> several thousand, ulp ;).
Hmm. This would argue for a completely table-based virtual catalog
setup. This is very doable with Interchange, and we will be coming out
with a template eventually. Consider:
in minivend.cfg:
GlobalSub <<EOR
sub setcat {
my $db = Vend::Database::database_exists_ref('store');
my $c_id = $::Scratch->{store_id} || 'default';
my $settings = $db->row_hash($c_id);
unless ($settings) {
::logError "$c_id not a store.\n";
$settings = $db->row_hash('default');
}
for(qw/COMPANY ADDRESS STATE COUNTRY POSTCODE YOU_GET_THE_IDEA/) {
$::Variable->{$_} = $settings->{lc $_};
}
return;
}
EOR
in catalog.cfg:
Autoload setcat
The problem with that many subcats is they end up eating all of your
memory. If you have any significant differences between them, each one
will add X kbytes to your memory footprint.
You just set up an Autoload that looks for the catalog ID
>
> After reading through the dox and hours spent reading through the
> archives I haven't come across any real answers regarding running a
> master catalog and hanging slaves from it. I like the idea as I will
> be sharing the HTML pages driven as templates and most of the
> database files (esp shipping, & userdb).
> However the only real differences between the shops will be the
> products that they carry (easily changed by altering the ProductFiles
> directive, or so I thought ;)
>
> Having created 3 shops as a test the basket page will pick up the sku
> of any orders placed in any other shop in the chain - but as each
> shop has its own unique products file it 'obviously' doesn't have the
> supporting price, description etc. (This (the sku) I presume is
> gleaned from the session db for the master catalog?). I actually want
> each shop to be an autonomous unit, so that from entry page through
> checkout to receipt follows its own template variables and only
> reflects its own unique products (and maybe those of the master cart,
> again easily sorted with the ProductFiles directive). Has anyone
> worked out a workaround for removing unwanted products from other
> carts using the master/slave model for this? Or is it indeed possible?
>
> Talking of which, can anyone explain why using this model that no
> matter which shop you are going through when clicking for "Check Out"
> it will always default to the master catalog (inheriting its template
> variables et al), yet the basket page (as specified under "Special"
> pages in the master catalog file) is called in exactly the same way
> i.e.
>
> [snip catalog.cfg]
> SpecialPage checkout __ORDER_STYLE__/checkout
> SpecialPage order __ORDER_STYLE__/basket
> [/snip]
>
> I assume this is "hard coded" somewhere deep within the MiniVend lib routines?
>
No, it is just that the subcatalog is configured with no knowledge of the
master's settings. It cannot read a variable set there.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>
I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list