Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
dmaui
dmaui
I have a simple question -- how do you change the settings so that instead of text, there is a graphic button for "add to cart" in the listing and detail page?
 
SajMalik
SajMalik
This is how I do it:
 
templates>user>block_products_list
also for block_product_details.html
 
<!-- begin add_button -->
<a class="button button-add" id="add_{form_id}" href="{buy_href}" onClick="return confirmBuy(document.form_{form_id}, 'cart');"><span>{ADD_TO_CART_MSG}</span><br />
<img src="../../images/rainbow/shoppingcartADD2.gif" alt="{ADD_TO_CART_MSG}" border="0"" align="absmiddle"></a>
<!-- end add_button -->
 
I leave the text in place - also useful for alternative languages.
 
Hope this helps
 
Chris
 
dmaui
dmaui
Okay, I thought modifying the template was the way to go, but wanted to make sure I wasn't circumventing any Viart code by doing so.
 
Thanks, Chris.
 
Ned
Ned
Please _dont_ modify files in "templates/user/"
 
Create a new folder in templates (I use the site name), copy block_products_list etc to it and change these. Then change your layout to the new folders name .
 
As has been explained elsewhere ViArt looks for templates first in the folder assigned for layout and if it cant find a folder then falls back to those in "templates/user".
 
This makes upgrading _a lot_ easier and simpler as you just overwrite existing files and then check for significant differences in the changed templates.
 
SajMalik
SajMalik
" ViArt looks for templates first in the folder assigned for layout and if it cant find a folder then falls back to those in "templates/user/" "
 
Is that true? I have posted this as a method that my older shop software (SquirrelCart) uses but I was unaware that Viart also did this?
 
If thus is the case it needs to be announced by Viart as, I agree, it makes upgrading so very much easier!!!
 
Vito
Vito
Hello Chris,
 
Actually it was announced in our previous release at
http://www.viart.com/viart_shop_v_dot_3_4_released.html
and you can check it in 'Full CMS support for all pages' section.
 
Thanks,
ViArt Team
 
jty (Guest)
jty (Guest)
To clarify, if we create a new folder for our templates and call it eg /myusertemplates and /myadmintemplates
1. We put only the user and admin templates we have changed. Not all the template/user and template/admin templates. Just the ones we modified ?
2. When viart looks for a template, it will first go to /mytemplates or /myadmintemplates. If it doesn't find it there, it will then go to templates/users or templates/admin ?
3. When we upgrade, the upgrade will overwrite the templates in templates/user and templates/admin but not touch the ones we put in /mytemplates and /myadmintemplates ?
 
Is this correct?
Thanks Ned, Thanks Master Yoda
 
jty (Guest)
jty (Guest)
Also, where does Viart look for the standard templates. In shop root/templates/users ?
I have moved my templates out of public_html per Viart's recommendation I found somewhere on this site
 
Dan (Guest)
Dan (Guest)
Yes jty... you're correct on both of those
 
SajMalik
SajMalik
Thanks, Master Yoda, there is so much going on that very useful features like this get easily missed.
 
Thank you. Good
 
jty (Guest)
jty (Guest)
Master Yoda, thanks for the info but it doesn't make sense.
In http://www.viart.com/online_store_global_website_layout.html
Viart tells us to:
"Note: for security reasons we would suggest moving templates folders out from the web-tree, for example after installation your 'Templates' directory is set to "./templates/user"; you could move it one level up and set to "../templates/user". "
 
But Viart looks for the default templates in /templates/user.
 
So where do we tell Viart that the default templates have been moved to, to cater for the security reasons.
 
What am I missing please. Thank-you
 
Vito
Vito
Hello Jty,
 
"Note: for security reasons we would suggest moving templates folders out from the web-tree, for example after installation your 'Templates' directory is set to "./templates/user"; you could move it one level up and set to "../templates/user". "
 
You can ignore this recommendation as there is no any obvious reason to move your templates from stadard folder and we will remove this recommendation from the documentation.
 
Thanks,
Yoda
 
jty (Guest)
jty (Guest)
Oh Thank-you Master Yoda
And thank-you for your ever so fast response
You saved me alot of time trying to work out what's going on Good