Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-31-2012 05:31:21

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

A Few Questions

I am just starting to get v8 into shape and had a few questions which hopefully someone can help with:

1 - How do I change the width of the site? I have tried changing the widths in the all.css file where it mentions "wrapper" but this did not have any effect

2 - How do I put an image / colour as the background on each side of the site, once the width has been set?

3 - Is there a way of not moving away from the category / product detail page when adding to cart? In v7 I had a mod which did this, but was overwritten when v7 was updated?

4 - How do I stop the automatic image showing in the product detail display (for when I already have a (larger) image in the product detail display text?

5 - What change do I need to do to be able to use HTML in the short product description (again something I could do in the v7 site)?

Thanks for any assistance

Offline

 

#2 08-31-2012 05:58:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

1 - How do I change the width of the site? I have tried changing the widths in the all.css file where it mentions "wrapper" but this did not have any effect

In your skin's css/all.css file, change the widths of the following nodes:

#skin_top_wrapper
#skin_header_wrapper
#skin_navmenu
#skin_wrapper_content
#skin_left
#skin_content

All of these are at 900px or combine to close to 900px by default using spacing for margins.

2 - How do I put an image / colour as the background on each side of the site, once the width has been set?

Attach a background image to the node:

#skin_background

3 - Is there a way of not moving away from the category / product detail page when adding to cart? In v7 I had a mod which did this, but was overwritten when v7 was updated?

You could do this fairly easily using jQuery and a couple of mods to the default product detail display, but I'd recommend against it as file upload options would cease working.  The better approach would be to adjust the target for the continue shopping button by adjusting the setting for it under Store > Component > Settings > Shopping Cart and Wish List.  If you do want to do this, I'd recommend doing it as a custom job through our Custom Shop to ensure it gets done right.  We'd only be looking at an two or three hours on it, and would need a guarantee you're not using upload options.

4 - How do I stop the automatic image showing in the product detail display (for when I already have a (larger) image in the product detail display text?

Remove the large image filename from your product under Store > Catalog > Products.

5 - What change do I need to do to be able to use HTML in the short product description (again something I could do in the v7 site)?

Edit the display(s) you're using under Store > Store Displays > Product List Displays, and where you see:

Code:

$proddesc  = $this->xhtml_encode($proddisp['descshort']);

Replace with:

Code:

$proddesc      = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

And where you see:

Code:

print '<p>' . $proddesc . '</p>' . $eol;

Replace with:

Code:

print $proddesc . $eol;

Nick Hendler

Offline

 

#3 08-31-2012 07:48:00

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

Thanks Nick. Re my question 4, I asked the wrong question. What I should have asked was how do I stop the automatic image showing in the category display (for when I already have a (larger) image in the category display text?

Thanks again

Ian

Offline

 

#4 08-31-2012 08:45:42

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

Same answer, but remove the image from Store > Catalog > Categories.


Nick Hendler

Offline

 

#5 10-02-2012 04:14:29

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

Further to my question 5, what change do I need to do to be able to use HTML in the short product description when it appears in the search listing, as the HTML still shows here?

Thanks

Ian

Offline

 

#6 10-02-2012 09:16:06

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

You'll need to modify your product list displays under Store > Store Displays > Product List Displays.  In there, where you see:

Code:

$proddesc  = $this->xhtml_encode($proddisp['descshort']);

Replace with:

Code:

$proddesc  = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

Then further down where you see:

Code:

print '<p>' . $proddesc . '</p>' . $eol;

Replace with:

Code:

print $proddesc . $eol;

Nick Hendler

Offline

 

#7 10-02-2012 09:28:39

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

I'm now a bit confused - this is the change I had already made,  which sorts out the html in the short product description when I go to a product via category, but does not sort out the html when I do a search for the same product and get a list of the products?

For product displays I use a slightly modified version. Is there somewhere where I have to tell the search function to use this same (modifed) product list display?

Thanks

Ian

Offline

 

#8 10-02-2012 09:33:38

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

It's ok - I answered my own question

Thanks for your understanding and patience

Cheers

Ian

Offline

 

#9 12-04-2012 16:30:01

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

I would like to  use some html in the product title because I want the title to appear on 2-3 lines i.e.

Wedding Invitation
Love Hearts
XXYYZZ

as opposed to:

Wedding Invitation Love Hearts XXYYZZ

is there a way of doing this?

Thanks in advance

Ian

Offline

 

#10 12-05-2012 08:23:36

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

Yes.  In admin under Store > Store Displays > Product List Displays, you will see the following code in each of the displays that show descriptions (including the mobile display):

Code:

$proddesc  = $this->xhtml_encode($proddisp['descshort']);

Change to:

Code:

$proddesc  = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';

And where you see:

Code:

print '<p>' . $proddesc . '</p>' . $eol;

Change to:

Code:

print $proddesc . $eol;

Nick Hendler

Offline

 

#11 12-05-2012 08:29:50

Ian Gore
Member
Registered: 10-25-2005
Posts: 133

Re: A Few Questions

Hi Nick

I think the change you have described is for html in short product description, whereas what I was after was how to include html in the product title

Thanks

Ian

Offline

 

#12 12-05-2012 08:32:00

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

Sorry - my bad.  Not enough coffee this morning.  You really can't do that without extensive mods to the software all the way through all the displays and into the cart, checkout, emails, etc.  You're probably looking at 2-3 hours of time for somebody who knows everywhere to look to mod that much code and test to make sure everything was addressed.


Nick Hendler

Offline

 

#13 01-27-2013 18:21:15

mixer25
Member
From: Ireland
Registered: 04-02-2006
Posts: 601

Re: A Few Questions

webmaster wrote:

Yes.  In admin under Store > Store Displays > Product List Displays, you will see the following code in each of the displays that show descriptions (including the mobile display):

Code:

$proddesc  = $this->xhtml_encode($proddisp['descshort']);

Change to:

Code:

$proddesc  = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';

And where you see:

Code:

print '<p>' . $proddesc . '</p>' . $eol;

Change to:

Code:

print $proddesc . $eol;

I want to be able to use HTML in the short description...  I did the above and it left no description and errored, here is the changed code which is from Display Description and Add which was the only code that had the code described as above, I didn't try mobile but the rest didn't have any of the bits mentioned.

Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$eol      = $this->globals('core.eol');
$proddisp = $this->globals('ecom.prod_proddisp');
$id       = $proddisp['id'];
$formid   = 'ecom--prodaddtocartX--' . $id;
$quanid   = $formid . '--quantity';

// +--
// | Check the images.
// +--

$images = $this->check_images(array('prodsm' => array('root' => 'PUBLIC', 'dir' => 'media/ecom/prodsm', 'list' => $proddisp['imgsm'])));

// +--
// | Set our add_ok flag.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

// +--
// | Create the product name and link.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$prodlink  = $this->link_namespace('ecom','prodshow',array('ref'=>$proddisp['id']),$proddisp['seourl']);
$proddesc  = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';
// +--
// | Create the image tag.
// +--

$imgtag   = '';
$imgwidth = 0;

if (!(empty($images['prodsm']))) {

     $imglist = $this->make_list($images['prodsm']);
     $imgname = $imglist[0];

     $imgwidth = $this->globals('core_settings.ecom.imgsizeprodsm');
     $imgurl   = 'media/ecom/prodsm/' . $imgname;

     $imgtag   = '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
     $imgtag  .= 'alt="' . $prodname . '" />';

} // End of if statement.

// +--
// | Print the display.
// +--

print '<table class="invisible"><tr><td class="invisible" style="';

if (!(empty($imgtag))) {print 'width: ' . $imgwidth . 'px; ';}

print 'padding: 0px 10px 10px 0px;">' . $eol;

if (!(empty($imgtag))) {

     print '<a href="' . $prodlink . '" title="' . $prodname . '">' . $imgtag . '</a>' . $eol;

     print '</td><td class="invisible" style="padding: 0px 10px 10px 0px;">' . $eol;

} // End of if statement.

print '<div class="prodlistname">' . $eol;
print '<p><a href="' . $prodlink . '" title="' . $prodname . '"><strong>' . $prodname . '</strong></a></p>' . $eol;
print '</div>' . $eol;

print '<div class="prodlistdesc">' . $eol;
print $proddesc . $eol;
print '</div>' . $eol;

$this->globals('ecom.prod_priceinfo',$proddisp['core.priceinfo']);
$this->globals('ecom.disp_priceinfo','left');
$this->globals('ecom.reviews_priceinfo',1);
$this->globals('ecom.loyaltypoints_showworth_priceinfo',0);

$this->include_file('ecom','pricedisp.php');

if ($add_ok) {

     if (!(empty($proddisp['xprodoptions']))) {

          $link = $this->link_namespace('ecom','prodshow',array('ref'=>$proddisp['id']),$proddisp['seourl']);

          print '<form action="' . $link . '" id="' . $this->xhtml_encode($proddisp['id']) . '" method="post">';
          print '<p><input class="formbutton" type="submit" name="' . $this->xhtml_encode($proddisp['id']) . '" ';
          print 'id="' . $this->xhtml_encode($proddisp['id']) . '--SUBMIT" value="Add With Options" /></p></form>' . $eol;

     } else {

          $this->xhtml_quickform_header($formid,'ecom','addcart',array());

          print '<p class="hidden"><label for="' . $formid . '--quantity';
          print '" class="hidden">Quantity</label></p>' . $eol;
          print '<p class="hidden"><input type="hidden" name="';
          print $formid . '--quantity" id="' . $formid . '--quantity';
          print '" value="1" /></p>' . $eol;

          $this->include_namespace('ecom','prodshowoptlite',array('form' => $formid, 'showquan' => 0, 'headfoot' => 0, 'secions' => 0));

          $this->xhtml_quickform_footer($formid,'Add To Cart',1);

     } // End of if statement.

} // End of if statement.

print '</td></tr></table>' . $eol;

?>

Last edited by mixer25 (01-27-2013 18:24:28)

Offline

 

#14 01-28-2013 08:46:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

You left off the curly bracket at the end of this line:

Code:

if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';

It should read:

Code:

if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

Nick Hendler

Offline

 

#15 01-28-2013 18:31:24

mixer25
Member
From: Ireland
Registered: 04-02-2006
Posts: 601

Re: A Few Questions

That's great, works a treat! Thanks.. do you think this has any SEO disadvantages?

Heres the full code from Display Description and Add Button (just change this one under under Store > Store Displays > Product List Displays)

Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$eol      = $this->globals('core.eol');
$proddisp = $this->globals('ecom.prod_proddisp');
$id       = $proddisp['id'];
$formid   = 'ecom--prodaddtocartX--' . $id;
$quanid   = $formid . '--quantity';

// +--
// | Check the images.
// +--

$images = $this->check_images(array('prodsm' => array('root' => 'PUBLIC', 'dir' => 'media/ecom/prodsm', 'list' => $proddisp['imgsm'])));

// +--
// | Set our add_ok flag.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

// +--
// | Create the product name and link.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$prodlink  = $this->link_namespace('ecom','prodshow',array('ref'=>$proddisp['id']),$proddisp['seourl']);
$proddesc  = $proddisp['descshort'];
$desc_has_tags = $this->has_tags($proddesc);
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}
// +--
// | Create the image tag.
// +--

$imgtag   = '';
$imgwidth = 0;

if (!(empty($images['prodsm']))) {

     $imglist = $this->make_list($images['prodsm']);
     $imgname = $imglist[0];

     $imgwidth = $this->globals('core_settings.ecom.imgsizeprodsm');
     $imgurl   = 'media/ecom/prodsm/' . $imgname;

     $imgtag   = '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
     $imgtag  .= 'alt="' . $prodname . '" />';

} // End of if statement.

// +--
// | Print the display.
// +--

print '<table class="invisible"><tr><td class="invisible" style="';

if (!(empty($imgtag))) {print 'width: ' . $imgwidth . 'px; ';}

print 'padding: 0px 10px 10px 0px;">' . $eol;

if (!(empty($imgtag))) {

     print '<a href="' . $prodlink . '" title="' . $prodname . '">' . $imgtag . '</a>' . $eol;

     print '</td><td class="invisible" style="padding: 0px 10px 10px 0px;">' . $eol;

} // End of if statement.

print '<div class="prodlistname">' . $eol;
print '<p><a href="' . $prodlink . '" title="' . $prodname . '"><strong>' . $prodname . '</strong></a></p>' . $eol;
print '</div>' . $eol;

print '<div class="prodlistdesc">' . $eol;
print $proddesc . $eol;
print '</div>' . $eol;

$this->globals('ecom.prod_priceinfo',$proddisp['core.priceinfo']);
$this->globals('ecom.disp_priceinfo','left');
$this->globals('ecom.reviews_priceinfo',1);
$this->globals('ecom.loyaltypoints_showworth_priceinfo',0);

$this->include_file('ecom','pricedisp.php');

if ($add_ok) {

     if (!(empty($proddisp['xprodoptions']))) {

          $link = $this->link_namespace('ecom','prodshow',array('ref'=>$proddisp['id']),$proddisp['seourl']);

          print '<form action="' . $link . '" id="' . $this->xhtml_encode($proddisp['id']) . '" method="post">';
          print '<p><input class="formbutton" type="submit" name="' . $this->xhtml_encode($proddisp['id']) . '" ';
          print 'id="' . $this->xhtml_encode($proddisp['id']) . '--SUBMIT" value="Add With Options" /></p></form>' . $eol;

     } else {

          $this->xhtml_quickform_header($formid,'ecom','addcart',array());

          print '<p class="hidden"><label for="' . $formid . '--quantity';
          print '" class="hidden">Quantity</label></p>' . $eol;
          print '<p class="hidden"><input type="hidden" name="';
          print $formid . '--quantity" id="' . $formid . '--quantity';
          print '" value="1" /></p>' . $eol;

          $this->include_namespace('ecom','prodshowoptlite',array('form' => $formid, 'showquan' => 0, 'headfoot' => 0, 'secions' => 0));

          $this->xhtml_quickform_footer($formid,'Add To Cart',1);

     } // End of if statement.

} // End of if statement.

print '</td></tr></table>' . $eol;

?>

Last edited by mixer25 (01-28-2013 18:32:47)

Offline

 

#16 01-29-2013 08:57:24

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: A Few Questions

I don't think this would hurt or help SEO in any way.


Nick Hendler

Offline

 

#17 06-26-2014 00:00:28

mdowning
Member
From: California
Registered: 11-05-2010
Posts: 725
Website

Re: A Few Questions

2 - How do I put an image / colour as the background on each side of the site, once the width has been set?

Attach a background image to the node:

#skin_background

---------------

Here is what I have and my image does not come up although the image is there....
--------------------------------
/* +------------------------------------------------------------+ */
/* | Skin Background                                              | */
/* +------------------------------------------------------------+ */

#skin_background {
     background-color: #FFFFFF;
     padding: 0px;
     margin: 0px;
     background-image: url('prepsetcetera.org/store/media/skins/logos/background.png');
     background-position: top left;
     background-repeat: repeat;
     background-attachment: fixed;
     }


http://tuxedothemes.org/
Wordpress Themes for business, blogs and personal use.

Offline

 

#18 06-26-2014 00:45:09

robash
Member
Registered: 02-10-2013
Posts: 344

Re: A Few Questions

Your bg image is displaying in firefox okay.


Rob

God Save The Queen

Offline

 

Board footer