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.
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
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:
$proddesc = $this->xhtml_encode($proddisp['descshort']);
Replace with:
$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:
print '<p>' . $proddesc . '</p>' . $eol;
Replace with:
print $proddesc . $eol;
Offline
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
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
You'll need to modify your product list displays under Store > Store Displays > Product List Displays. In there, where you see:
$proddesc = $this->xhtml_encode($proddisp['descshort']);
Replace with:
$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:
print '<p>' . $proddesc . '</p>' . $eol;
Replace with:
print $proddesc . $eol;
Offline
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
It's ok - I answered my own question
Thanks for your understanding and patience
Cheers
Ian
Offline
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
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):
$proddesc = $this->xhtml_encode($proddisp['descshort']);
Change to:
$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:
print '<p>' . $proddesc . '</p>' . $eol;
Change to:
print $proddesc . $eol;
Offline
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
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.
Offline
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.
<?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
You left off the curly bracket at the end of this line:
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';
It should read:
if (empty($desc_has_tags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}
Offline
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)
<?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
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;
}
Offline
Your bg image is displaying in firefox okay.
Offline