Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
Antn (Guest)
Antn (Guest)
Hi,
 
Viart is great! I just spent the last 2 weeks searching for a cart that doesnt require a master php coder to configure - especially the store layout. Viart is BY FAR the easiest cart to use and configure. However, I need some help.
 
I want to add the "add to cart", "view cart", "check out" symbols to the listings other than "product listing" where it shows by default.
 
For example, I also want to show these links on the "special offer" listing, the "Recently Viewed" listing, the "Top Rated Listing", etc.
 
I tried copying this HTML code below into the html files of the different listings (ex. block_offers.html, block_products_top_viewed.html) but nothing shows.
 
"<td colspan="3">
<!-- begin add_button -->
<a class="button" id="add" href="{buy_href}" onClick="return
 
confirmBuy(document.form_{item_id});"><span>{ADD_TO_CART_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
<!-- end add_button -->
<!-- begin add_button_disabled -->
<a class="disabled" title="{PRODUCT_OUT_STOCK_MSG}"
 
onClick="alert('{out_stock_alert}');">{ADD_TO_CART_MSG}</a>
<!-- end add_button_disabled -->
<!-- begin view_button -->
<a class="button" id="view"
 
href="{basket_href}?rp={rp_url}"><span>{VIEW_CART_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
<!-- end view_button -->
<!-- begin checkout_button -->
<a class="button" id="check"
 
href="{checkout_href}?rp={rp_url}"><span>{GOTO_CHECKOUT_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
<!-- end checkout_button -->
</td>"
 
(By the way, the above code is not complete, the viart forum software is stripping the html tags completely off! How do I post html code without having the tags stripped off?)
 
 
Then I added this code to the .php files of the listing filies and still nothing works???
 
$t->set_var("ADD_TO_CART_MSG", ADD_TO_CART_MSG);
$t->set_var("VIEW_CART_MSG", VIEW_CART_MSG);
$t->set_var("AMEND_CART_MSG", AMEND_CART_MSG);
$t->set_var("GOTO_CHECKOUT_MSG",GOTO_CHECKOUT_MSG);
$t->set_var("PROD_CODE_MSG", PROD_CODE_MSG);
$t->set_var("PROD_AVAILABILITY_MSG", PROD_AVAILABILITY_MSG);
$t->set_var("PRODUCT_OUT_STOCK_MSG", htmlspecialchars(PRODUCT_OUT_STOCK_MSG));
$t->set_var("out_stock_alert", str_replace("'", "\\'", htmlspecialchars(PRODUCT_OUT_STOCK_MSG)));
 
Am I going about this the wrong way? Perhaps doing too much work? Is this something that can be done easily through the admin? If so, how, If not, how can I accomplish this?
 
Thanks
 
Antn <-- new viart fan
 
Anjula
Anjula
Hi,
 
Unfortunately, by default, there is no such possibility for special offers block. However, if you want you can add the code (as in the example below) to your 'block_offers.html' file:
 
<a class="button" id="add" href="index.php?item_id={item_id}&cart=add"><span>{ADD_TO_CART_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
<a class="button" id="view" href="basket.php?rp=index.php"><span>{VIEW_CART_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
<a class="button" id="check" href="checkout.php?rp=index.php"><span>{GOTO_CHECKOUT_MSG}</span><img src="images/tr.gif" align="absmiddle"></a>
 
and also add the following line at the top of index.php before includes:
$type = "list";
 
With regards,
ViArt Support Team