How do I get links on the shopping cart without . . . .

This is an archive of old posting to the User Forum

How do I get links on the shopping cart without . . . .

Postby David » Mon Jan 26, 2004 7:13 pm

How do I get links on the shopping cart without hardcoding them into the
shopping cart template? I'd like to use the database/custom template
generated links on the shopping cart page.

http://purifymyair.com/ (one of Shopsite's example sites) has the
functionality that I'm looking for on their cart - but, it is simply
hardcoded into the template or is it generated by Shopsite?

Dave
David
 

Re: How do I get links on the shopping cart without . . . .

Postby loren_d_c » Mon Jan 26, 2004 8:51 pm

This is probably not in the cart template, the ability to do this
pre-dates the ability to customize the cart template which was just
introduced in v7.

You can add HTML to your shopping cart pages in the Commerce Setup ->
Order System menus for the various cart screens. Each cart screen menu
there usually has a 'Text at the top of' and 'Text at the bottom of'
setting, and they have probably placed their navigation HTML in these
fields. The placement of these fields is coded in the template, however
it is usually pretty easy to get your own HTML in various places
surrounding the shopping cart contents with some simple HTML table tags
in the provided settings, so you don't generally have to muck with the
template to do this. For example, they have navigation on the top and on
the left, so in the 'Text at the top' they probably have something of
this general layout:

<table>
<tr><td colspan=2>
[top stuff goes here]
</td></tr>
<tr><td>
[left side stuff goes here]
</td><td>


So the shopping cart contents will be in the <td> you have left open in
the 'Text at the top', so in the 'Text at the bottom' you can close it
out like this:

</td></tr>
[if you want stuff at the bottom, add another table row and cell here]
</table>

-Loren



David wrote:

How do I get links on the shopping cart without hardcoding them into the
shopping cart template? I'd like to use the database/custom template
generated links on the shopping cart page.

http://purifymyair.com/ (one of Shopsite's example sites) has the
functionality that I'm looking for on their cart - but, it is simply
hardcoded into the template or is it generated by Shopsite?

Dave
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: How do I get links on the shopping cart without . . . .

Postby David » Tue Jan 27, 2004 10:09 am

I'm generating my links "dynamically" with the Shopsite template parser -
I'd like to be able to utilize those links on the shopping cart without
having to copy the template generated html snippet and manually paste it
into the 'Text at . .' fields. Using the suggested method (if I'm
interpreting it correctly) means that every link addition or deletion
invoked by a database change requires that a manual edit be performed to
the shopping cart.

Is there any form of "include" that can be used within the shopping cart
template or in the SC 'Text at . .' fields?

Also, it appears that, despite the 'global' attribute for VAR.-,
Shopsite does not store VAR.- values for use by the shopping cart CGI -
is this correct?

Dave

On Mon, 26 Jan 2004 19:51:40 -0700, Loren <loren_d_c@yahoo.com> wrote:

This is probably not in the cart template, the ability to do this
pre-dates the ability to customize the cart template which was just
introduced in v7.

You can add HTML to your shopping cart pages in the Commerce Setup -
Order System menus for the various cart screens. Each cart screen menu
there usually has a 'Text at the top of' and 'Text at the bottom of'
setting, and they have probably placed their navigation HTML in these
.. . . . .[snip]
David
 

Re: How do I get links on the shopping cart without . . . .

Postby loren_d_c » Tue Jan 27, 2004 10:54 am

The shopping cart screens are not database pages in the Page section, so
there is no way to dynamically assign page links to the shopping cart
screens.

The only way I can think of to do something that would simulate that
would be to put an INCLUDE in the shopping cart template that would
include a file in your data/templates/includes/ directory that is really
a symbolic link to the filename of a Page that you have created
specifically for this purpose (might have it's own page template so that
all it contains is page links navigation). In fact, if you want global
navigation, you could use this same page as an include in your page and
product templates for navigation on all of your other pages.

As far as VAR's go, no they are not constant globals for every part of
ShopSite, they are global in memory for as long as the particular
process that set them is alive, for example VAR's in the page or product
templates will last for the entire Publish once they are encountered.
VAR's in the shopping cart templates will only last for that instance of
the shopping cart CGI, so as soon as one cart screen is finished, any
VAR's are dumped, so VAR's are not a good way to pass information from
one shopping cart screen to another. They can be useful individually
within each DEFINE section, though, and I believe the default cart
template does use them like that.

-Loren




David wrote:

I'm generating my links "dynamically" with the Shopsite template parser
- I'd like to be able to utilize those links on the shopping cart
without having to copy the template generated html snippet and manually
paste it into the 'Text at . .' fields. Using the suggested method (if
I'm interpreting it correctly) means that every link addition or
deletion invoked by a database change requires that a manual edit be
performed to the shopping cart.

Is there any form of "include" that can be used within the shopping cart
template or in the SC 'Text at . .' fields?

Also, it appears that, despite the 'global' attribute for VAR.-,
Shopsite does not store VAR.- values for use by the shopping cart CGI
- is this correct?

Dave

On Mon, 26 Jan 2004 19:51:40 -0700, Loren <loren_d_c@yahoo.com> wrote:

This is probably not in the cart template, the ability to do this
pre-dates the ability to customize the cart template which was just
introduced in v7.

You can add HTML to your shopping cart pages in the Commerce Setup -
Order System menus for the various cart screens. Each cart screen menu
there usually has a 'Text at the top of' and 'Text at the bottom of'
setting, and they have probably placed their navigation HTML in these

. . . . .[snip]
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: How do I get links on the shopping cart without . . . .

Postby David » Wed Jan 28, 2004 7:49 am

Loren,

Unfortunately, despite the fact that your response appears to have been
posted shortly after my post, it didn't show up at my end until this (Wed)
morning* - after I had spent quite a bit of time (and cursed quite a bit)
to arrive at the same solution. I, however, symlink'd in the opposite
direction - which has occurred to me to be a possible security issue???

my current setup:
cd /usr/www/bob/public_html/includes
ln -s /usr/home/bob/ss_data/templates/includes

your suggestion:
cd /usr/home/bob/ss_data/templates/includes/html
ln -s /usr/www/bob/public_html



*this is the second time I've noticed this in the newsgroup - anyone else
having problems (I've just started using Opera's newsreader - the problem
might be at my end)?



On Tue, 27 Jan 2004 09:54:38 -0700, Loren <loren_d_c@yahoo.com> wrote:

The shopping cart screens are not database pages in the Page section, so
there is no way to dynamically assign page links to the shopping cart
screens.

The only way I can think of to do something that would simulate that
would be to put an INCLUDE in the shopping cart template that would
include a file in your data/templates/includes/ directory that is really
a symbolic link to the filename of a Page that you have created
specifically for this purpose (might have it's own page template so that
all it contains is page links navigation). In fact, if you want global
navigation, you could use this same page as an include in your page and
product templates for navigation on all of your other pages.

[snip]
David
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 13 guests