Jump to content

how can i hide Choose Product from ajax order form.


Recommended Posts

i dont have a knowelege about php so can any developer tell me how can i hide Choose Product from ajax order form. I can do it using apply a comment in products.tpl in some lines then it hides, and work perfectly as i want. but it's not showing products on cart.php so can any one help me with this ?

Link to comment
Share on other sites

if you just wanted to remove "Choose Product" from the forms, you could remove {$LANG.cartchooseproduct} from products.tpl, adddomain.tpl and addons.tpl... or just edit its entry in language files (e.g., lang/english.php)

 

$_LANG['cartchooseproduct'] = "Choose Product";
Link to comment
Share on other sites

when we click on whmcs direct link other order form not show the choose product categories Options but ajax cart showing it. i just want to hide it from ajax cart it should be show only

 

register domain

transfer domain

I Want To Keep My Domain Name Somewhere Else.

Link to comment
Share on other sites

just to be clear..

 

if someone uses a direct link to the cart, you don't want them to see the blue box...

for everyone else who doesn't use a direct link, you do want them to see the blue box ?

 

for these direct linked products, do you want them to be purchased only via direct links, or can they be purchased through the cart as normal ?

Link to comment
Share on other sites

Thanks for reply brian,

 

if someone uses a direct link to the cart, i don't want them to see the blue box.

for everyone else who doesn't use a direct link, yes i want them to see the blue box .

 

when we use a direct link to purchase the Products only ajax cart order form show the blue box. other any order form did not show the blue box. i just want to hide the blue box from the ajax cart as other order form work.

Link to comment
Share on other sites

ok... this was tricky, but I think it can be done... :idea:

 

in ajaxcart/products.tpl, you just need to replace ~line 14

 

<h2>{$LANG.cartchooseproduct}</h2>

with...

 

{if (!$smarty.server.QUERY_STRING|strstr:'pid=')}
<h2>{$LANG.cartchooseproduct}</h2>

and then replace at ~line 39

 

{if $numitemsincart}<div id="checkoutbtn"><input type="button" value="{$LANG.ajaxcartcheckout}" onclick="checkout()" /></div>{/if}

with...

{if $numitemsincart}<div id="checkoutbtn"><input type="button" value="{$LANG.ajaxcartcheckout}" onclick="checkout()" /></div>{/if}
{/if}

with those changes made - direct links shouldn't show the blue box; everyone else should see it as normal.

Link to comment
Share on other sites

can you PM a link to your site - I probably need to see this to help further...

 

update: for anyone wanting to use this code, it works fine - there was another issue with mazaamahesh's site that was causing his error.

Edited by brian!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated