Need some help coding zen cart product layout - php

I am currently working on my ecommerce website. Having a lot of trouble and I do not know where can I start editing the positioning of the product lay out.
For example:
http://www.picaflor-azul.com/free-demos/index.php?main_page=product_info&cPath=1_4&products_id=2
Currently my product layout in page is like this.
What I would like to achieve is something like that:
https://jawbone.com/up
Something like the section of "Designed for everyday life"
I would like to place my product image on the right.
Currently because I have made the width of the page bigger, it was aligned on left. Is there any way I can do to make it center?
Is there any zen cart experts here to help? Because I do not know what file do I have to edit in order to achieve what I want..

You will need to edit the product info display template file to get the layout you want. It can be found under the templates folder in your custom template folder. tpl_product_info_display.php.
You can then style the elements on this page by modifying the main CSS stylesheet for your template.

Related

Customising WooCommerce "products" listing HTML layouts

I'm currently adapting the WooCommerce Storefront theme for a client and am struggling to change the layout for the woocommerce "products" widget that displays a list of given products. I believe the template for this is "plugins/woocommerce/templates/content-widget-product.php".
However, adding it to my theme's "themes/mytheme/woocommerce/content-widget-product.php" directory and adjusting it doesn't appear to work.
Essentially I need to change the default structure from this:
To This:
I must be missing something obvious, surely?
OK, so within WooCommerce there is "content-widget-product.php" which returns a product's details for one type of widget.
There is also "content-product.php" which returns a product for their main [Products] shortcode loop... the main loop that gets used on the shop page, etc.
Editing the content-product.php file and overriding its related WooCommerce functions achieved what I needed.
Hopefully, this might help someone else in the future and save a few hours of hunting around!

how to make a product image clickable and redirect to product details site in wordpress/woocommenrce/uncode theme

I couldn't find a tutorial or hint regarding making a product image in the wordpress theme "uncode" clickable. when clicking on the product image, it only opens the image in full size but doesnt rather redirect to the details page.
I assume it isn't a big thing that needs to be changed/added, but finding it seems quite difficult, as I have no experience regarding this theme at all.
thanks upfront!
EDIT: What I am trying to find out, is how to make this (tutorial for another theme https://slocumthemes.com/2015/10/how-to-make-woocommerce-thumbnails-clickable/) for my theme, uncode.
can anybody help? I think I found the line of code in one of the php files, but I have no proper experience of php
You can override woocommerce template.
Create a folder named woocommerce in your uncode theme and further corresponding folders where relevant file is added in woocommmerce plugin. e.g woocommerce/templates/single-product/product-image.php.
In that overridden file you can customize the HTML i.e link your image.

How to centralise logo between menu item in wordpress?

I would like to centralise logo between menu item in Wordpress dt the7 theme, is there any solution to solve this problem? Because currently the menu was using build in layout which is logo at the top and menu item at below.
I can't telling you exactly without seeing the problem, but you probably have to play with the line-height css property.
If you give us a clear example we will be able to help you more.

Get images out of product description in phtml file

as the title might let you suggest I have trouble to get image URL's out of product descriptions in my custom phtml file (located in template folder).
In cms pages/blocks you can use
{{media url="wysywig/Banner/image.jpg"}}
which we do for parts (headlines) of our product descriptions.
Now when I try to display that description out of my phtml file with
<?php echo nl2br($productResult[$i]->getDescription()); ?>
the description gets loaded but the image URL's dont get converted to total
URL's like for example "/media/wysywig/banner".
I know that you have to use Mage::getUrl("media") in php/phtml files though this information doesn't help much in my situation.
The only idea I have is to set a string function to search for
{{media url="wysywig/banner/image.jpg"}}
and replace it with
Mage::getUrl("media/wysywig/image.jpg")
but I kinda feel like this isn't a very elegant solution.
Or is it the only way? Any help is appreciated.
Much thanks and greetings mpfmon
It doesn't work because it was not planned for the product description to have such media call:
{{media url="wysywig/Banner/image.jpg"}}
However there is nothing wrong doing this, to make it work, you have to filter your description with a widget function:
echo Mage::getSingleton('widget/template_filter')->filter($description);
You must enable "Allow Dynamic Media URLs in Products and Categories" setting in Catalog section of Magento configuration screen. (See attached image)

Woocommerce custom template

As you can see, the title, the placeholder image, the six bottles
image at the top are rendered by the single-product template. I need
it to be rendered by bto-item.php file so that I can edit the CSS, the
contents of it through the template files.
Can you give me the steps to work like that? Currently the select
options are being executed by the Composite product plugin templates.
In your currently used template create new folder named woocommerce and in it put the single product php file. And modify it by your need. :)

Categories