Jump to content

is there a way to have two different product pages


Recommended Posts

  • 1 month later...
Hi all,

Is there a way I can use two different product page designs, (one showing a different layout/design to the other) ?

Is this possable ?

All the best,
Steve


Steve,

Are you still looking for answer for this?

PM me and I will show you what I did and see if this is what you want. It will take a little bit work, but it is possible.
Link to comment
Share on other sites

Hi all,

Is there a way I can use two different product page designs, (one showing a different layout/design to the other) ?

Is this possable ?

All the best,
Steve


Steve,

Are you still looking for answer for this?

PM me and I will show you what I did and see if this is what you want. It will take a little bit work, but it is possible.


I want the same.
Link to comment
Share on other sites

I also need a solution for this. I think a great way to make this do-able is to build a module that will let you select a template file while editing a product.

Some of my suppliers would like to see our website have custom pages for their categories and product pages. This would be huge!

Link to comment
Share on other sites

yep ive done it, its fairly easy providing you know your way around php and html, cause all you do is setup a if elseif on the tpl file you want.

for example in the product-list.tpl if you want a different way to display the product look for the line {if !$product.name || $product.name == "product name"}

setup your layout then end it with {else} and have the standard one below it.

works the same on the product.tpl page as well.

Link to comment
Share on other sites

Yea this is the logical manual way of doing it.

I'm wondering if we can extend the product setup, like in magento you can select a template for each product.

It would use the same type of logic, but probably from an array or a 'slug'. I'll look into it and see if i can come up with a back office / front office solution.

Link to comment
Share on other sites

to do that as a module is going to be a bit of work, you need to build in a way to include a html template because of the way the list outputs differently in different areas. also the way it feeds out from the core shop schema still needs to be included into the html.

the example i gave was just for 1 custom page (soon 2) but would work to do multiple listings the same way or differently providing the output was still going to be handled in the same way.

Link to comment
Share on other sites

I received a lot of PMs, emails, and live chat requests regarding this thread. I am tired of answering the same questions. I don't want to repeat any more about how to do it. I am going to post my solution here.

I have made two different html templates that each calls for a different css. And I hard coded different category bars on the left column. I use the top menu bar to call for the different templates. I don't use different templates for my shop. therefore, I only made the front pages to show you the theory. If it is for the REAL shop, you will have to convert the entire site into using html template.

That is all I did. Please don't contact me for this thread any more. Thanks.

At my shop's main page (Not demo page), http://www.blossomcart.com/ you can see the different background then demo page.

Demo pages: http://www.blossomcart.com/florist-arranged-flowers.php and http://www.blossomcart.com/gift-baskets.php

You can see they used different css and each is with a different category menu.

Link to comment
Share on other sites

I received a lot of PMs, emails, and live chat requests regarding this thread. I am tired of answering the same questions. I don't want to repeat any more about how to do it. I am going to post my solution here.

I have made two different html templates that each calls for a different css. And I hard coded different category bars on the left column. I use the top menu bar to call for the different templates. I don't use different templates for my shop. therefore, I only made the front pages to show you the theory. If it is for the REAL shop, you will have to convert the entire site into using html template.

That is all I did. Please don't contact me for this thread any more. Thanks.

At my shop's main page (Not demo page), http://www.blossomcart.com/ you can see the different background then demo page.

Demo pages: http://www.blossomcart.com/florist-arranged-flowers.php and http://www.blossomcart.com/gift-baskets.php

You can see they used different css and each is with a different category menu.


Lol most people are going to want an easy answer for this, plug it in and switch it on easy!
Link to comment
Share on other sites



Lol most people are going to want an easy answer for this, plug it in and switch it on easy!

Sorry, that is all I know how to do it. I am not a programmer, I just made it do or do it without. If there is a better way, plug and go, please let me know. Thanks.

Also you need to know php and html in order to convert your site to use html templates. If you know these two languages, it is not hard to make that happen. It takes time, but it is workable.....
Link to comment
Share on other sites



Lol most people are going to want an easy answer for this, plug it in and switch it on easy!

Sorry, that is all I know how to do it. I am not a programmer, I just made it do or do it without. If there is a better way, plug and go, please let me know. Thanks.

Also you need to know php and html in order to convert your site to use html templates. If you know these two languages, it is not hard to make that happen. It takes time, but it is workable.....


yeah i agree, dont get me wrong im not trying to poke holes.

I got it to work for how i needed it but subscribers/readers of this thread shouldnt be expecting a ready built one size fits all solution!

(edit ill make that last line big so it gets read :D )
Link to comment
Share on other sites

Changing the css per product is a little bit awkward, but a tpl file per product isn't :cheese:

just change product.tpl to only contain:

{assign var=productTemplate value="product-`$product->id`.tpl"}
{include file="`$tpldir`./`$productTemplate`"} 



Then just create the product templates as product-1.tpl, product-2.tpl etc. etc. might take a while for 1,000 products though :P

Paul
[edited to add the $tpldir variable, just in case anybody tried the above and complained :lol: ]

Link to comment
Share on other sites

Changing the css per product is a little bit awkward, but a tpl file per product isn't :cheese:

just change product.tpl to only contain:
{assign var=productTemplate value="product-`$product->id`.tpl"}
{include file="`$tpldir`./`$productTemplate`"} 



Then just create the product templates as product-1.tpl, product-2.tpl etc. etc. might take a while for 1,000 products though :P

Paul
[edited to add the $tpldir variable, just in case anybody tried the above and complained :lol: ]



hrmm not if it was done dynamically so that the base code could be changed for each product then called within the product script as a variable, similar to how other carts do it.

eg within product.tpl calling subprodsetting1 which will load all the layout for that product etc.
Link to comment
Share on other sites

Yes, that post was an extreme example of having completely different files for each product.

You can build a base template file and use a similar technique to use the category name, for example, to include particular blocks of code that are product specific, that way it's possible to vary the content by product quite easily without creating a template per product. It does all rely on your coding in the template though -- so if you want to implement an optional override, then you'd need to do it yourself. In this example (of using the category to customise) you would also need to add new customisation when you add a new category, or have a default mechanism in your code.

This is all assuming that you don't just edit the actual page php itself (/product.php) -- which is an option, but not great when you need to upgrade.

The last option is to use the a combination of HOOK_EXTRA_LEFT, HOOK_EXTRA_RIGHT, HOOK_PRODUCT_ACTIONS, HOOK_PRODUCT_TAB AND HOOK_PRODUCT_TAB_CONTENT and code your own customisations in a theme/site specific module. With a bit of care you can also use one of the hooks "higher up" on the page and define variables you want to use throughout the template.

That's quite a few options :cheese:

One of the compromises with any system is performance, and while "overrides" (a la ZenCart etc.) can be shop owner friendly -- that doesn't mean it makes for good, fast well designed sites!

It is a very great pity that we are forced to use a parser (smarty) at all though. I personally feel that it should be optional and that we should be able to pass data direct to php scripts instead of smarty .tpl files. If a generic method of calling the templates had been implemented, then we could have used something like :

   global $parser;

   $data = array($var => value, $var => value1);

   $parser->render('template', $data);




Then within the parser class it could detect whether smarty was being used or not and take action appropriately. Sadly this isn't the case :down:

Paul

Link to comment
Share on other sites

I did not know this thread is such a hot topic as I am still getting emails and live chat requests on the shop. Guys, please be a little bit more thoughtful as it is a live shop and I have a business to operate.

I am going to answer the questions here.

1) You don't need to prepare a html template per product, you only need to prepare ONE full html template per category. Use my shop as an example, I have 6 main categories: Grower fresh, Florist arranged, plants, gifts baskets, same day delivery and international. If I am using this html template method to show different categories with different looks, I will prepare 6 different html templates and each with corresponding categories.

2) I got this idea from Coppermine, the script that I used for my gallery/e-card. They are using html template system. And it is very easy to switch between templates with different look and features. You can take a look at my site http://www.blossomcart.com/gallery/ and http://www.blossomcart.com/ecard/ They are using the same script but with different html templates in which they call for different categories with different looks and different features.

3) If you have 2000 products, you don't need to prepare 2000 templates. you only need to prepare a FULL html template per categories. For example, I only have one page html template for my ecards and one page html template for my gallery. You need to know how to use php to group the elements together so that it can be used in the html template. If you have any questions on how to convert a php script into using a html template, please down load a coppermine script and study it, then you will know what I am talking about. Your html template should not be 30 pages long. It should be only one page, which calls for different group of elements. Take a look at Coopermine's free templates, they have 100 of them for you to choose from and study for. All of them are one page long. Short and easy.

4) Coppermine is one of the biggest open source gallery scripts, they are using html for their template, I really don't see anything wrong with it. Regarding security issue, I really am not the right person to answer if HTML template is not good to use. If really there is an issue, I would doubt why Coppermine is using html template.

5) I don't freelance work for others as I don't have enough knowledge for programming. I only make it do or do it without. Form the scale of 1 to 10, 1 is the lowest. My programming knowledge is not even reach to 1 yet. Thanks for the job offer.

I hope I answered all of the questions. Please don't contact me regarding this issue anymore, Really, seriously, I feel like I got hack....

Link to comment
Share on other sites

I think we may be talking about two different things here :)

I thought I was discussing how to change the product listings on an individual product basis, rather than the over all page for a blog, gallery etc. or am I missing something?

Paul
p.s. worry not - I haven't and will not stalk you :-P

Link to comment
Share on other sites

  • 2 weeks later...

G'day Star, I have read quite a few of your posts and i like the support and advice you give to this forum.

I have a favour to ask. Would you mind popping over to my site sometime and telling me what you think about its appearance, navigation, appeal, etc. It is my first site and due to go live (though its up at the moment), on September 1st, 2009.

If you are unable, i wont be offended at all. i have just enjoyed your advice given regarding marketing and design in the past, and wouldn't mind hearing more of your thoughts.

Link to comment
Share on other sites

Okay David,

I am not very good at web designing, but this is how I will do if I design a similar website as yours:

1) Move the tag block to the left side, on the top that replace where the search block is now.
2) Move the search block under the information block.
3) You need to extend the feature products section to 12 so that you won’t have a big gap in between with the footer.
4) About the order by phone block, use a red phone image in it, it will look better.
5) Regrading the About Us, About Our Games section, present it in a better and clean way. it is very hard to read now. break them down in different sections with bigger titles . It will look better.

Color option #1)
You have a yellow map as a background, your header should use a yellow that match the map such as #ddd596 or #e5dea5 (see the attached pic)

Use color#a5936f for the blocks. And color #beb39d for insides of the features product blocks.

Color option #2)

Change the map color to a little bit toward red. And coordinate the blocks with that.

Color option #3)

Change the map color to a little bit toward green. And coordinate the blocks with that. ( I like this one)

10588_okiSpdIX2PgmcufUeyYy_t

10589_NynXBpmpVJbiutSrowDs_t

10590_ZSvL3RKceeugwhIpNPUw_t

Link to comment
Share on other sites

G'day Star, I have read quite a few of your posts and i like the support and advice you give to this forum.

I have a favour to ask. Would you mind popping over to my site sometime and telling me what you think about its appearance, navigation, appeal, etc. It is my first site and due to go live (though its up at the moment), on September 1st, 2009.

If you are unable, i wont be offended at all. i have just enjoyed your advice given regarding marketing and design in the past, and wouldn't mind hearing more of your thoughts.


Yeah david id do something with that background (the maps one), when you first visit the page the busy background draws you away from the center of the page which is where you want the focus to be set.

Also look at a logo or something to explain or represent what your shop is about, people can remember a logo a lot. using part of the logo colours then build the rest of the site around that (like the blocks).

Attached is a logo i threw together, you can use it if you want.

10593_ihDfXDzqMtnZ9EUy15Tx_t

Link to comment
Share on other sites

Katmat. I am a little bit in awe of your response. I love the logo. It hits the mark like you wouldn't believe. Your response also rasies two quesitons.

1. What do i do with the background if i remove my map?
2. Where on the site can/should i use this logo??

Also, i realise my site has probably meant the demise of many wingless fairies, but i have not been able to find a block colour combo that i like. One that is soft enough, yet not dull.

Logo wise, i guess i was relying on the header and my little men (Indian tic tac toe)

Link to comment
Share on other sites

Thanks Star, i am on to it right away. Thanks especially for taking the time.

By the way, your "my account block" is that available anywhere? It doesn't look like any default block i have seen.


I. One simple solution is to use an IF sentence in the header.tlp to call the css depending of the URL. For ecample, for the archive root and the index.php, I use one css, an another css file for the rest of the php files of the site:

Search in the header.tpl this code:
--------------------------------------------------
{if isset($css_files)}
{foreach from=$css_files key=css_uri item=media}
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
{/foreach}
{/if
---------------------------------------------------

And replace for something like this:
---------------------------------------------------


{php}
if ($_SERVER['REQUEST_URI'] == '/' OR $_SERVER['REQUEST_URI'] == '/index.php'){
print '<link href="/themes/nametemplate/css/global.css" rel="stylesheet" type="text/css" media="all" />';
}
else

{
print '<link href="/themes/nametemplate/css/global2.css" rel="stylesheet" type="text/css" media="all" />';

}
{/php}
-----------------------------------------------------

Remember the href="/themes/nametemplate/css/global2.css" is the route to yoir CSS file.
Link to comment
Share on other sites

Katmat. I am a little bit in awe of your response. I love the logo. It hits the mark like you wouldn't believe. Your response also rasies two quesitons.

1. What do i do with the background if i remove my map?
2. Where on the site can/should i use this logo??

Also, i realise my site has probably meant the demise of many wingless fairies, but i have not been able to find a block colour combo that i like. One that is soft enough, yet not dull.

Logo wise, i guess i was relying on the header and my little men (Indian tic tac toe)


no probs, sounds like you might have some marketing layout questions to sort out.

I dropped you a pm if you need more help.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...