[solved] Orders ... FEU display if users not logged in ?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

[solved] Orders ... FEU display if users not logged in ?

Post by pedes »

I'm using Orders Module (CGecommerce suite)

I would like to display the FEU login if the user is not logged in and display the orders first step if the user is logged in.
Before when used Orders module version 1.9.1 there was no problem to do this, but since i upgrade all modules (new Orders module to version 1.10.2)
Below you see the template i use, no problem with that in Orders 1.9.1 but in Orders 1.10.2 i can not get it working.

I also tried to use CustomContent with {if $ccuser->loggedin()} , that is not a good solution because then i always get the Orders first step above the next step.

So how i get the {if $logged_in} make to work, or do i need to use another call

this is how it used to work:
{* billing form template *}
{* this is a frontend template *}
{if $logged_in}
{$Orders->Lang('order_processing')}:
{if isset($status)}
 {* there is an error of some type.... you can check the $status variable for the type of error *}
 
 
 {foreach from=$errors item='error'}
   {$error}
 {/foreach}
 
 
{/if}

{$formstart}



{$Orders->Lang('billing_info')}:
{$Orders->Lang('company')}: {$input_billing_company}

{$Orders->Lang('first_name')}:* {$input_billing_first_name}

{$Orders->Lang('last_name')}:* {$input_billing_last_name}

{$Orders->Lang('address1')}:* {$input_billing_address1}

{$Orders->Lang('address2')}: {$input_billing_address2}

{$Orders->Lang('city')}:* {$input_billing_city}

{$Orders->Lang('state/province')}:* {$input_billing_state}

{$Orders->Lang('postal')}:* {$input_billing_postal}

{$Orders->Lang('country')}:* {$input_billing_country}

{$Orders->Lang('phone')}: {$input_billing_phone}

{$Orders->Lang('fax')}: {$input_billing_fax}

{$Orders->Lang('email')}:* {$input_billing_email}





{* if you do not need shipping information, just hide these fields using css *}
{foreach from=$shipping_inputs item='one' name='shippments'}

{assign var='addr' value=$one.data->get_shipping_address()}

{* this next part is a bit hackish *}
{capture assign='name'}{$one.data->get_name()}{/capture}
{if $smarty.foreach.total == 1}{$Orders->Lang('shipping_info_if_different')}:{else}{$Orders->Lang('shipping_info_for')}: {$name}:{/if}
{$Orders->Lang('company')}: {$one.input_company}

{$Orders->Lang('first_name')}:* {$one.input_first_name}

{$Orders->Lang('last_name')}:* {$one.input_last_name}

{$Orders->Lang('address1')}:* {$one.input_address1}

{$Orders->Lang('address2')}: {$one.input_address2}

{$Orders->Lang('city')}:* {$one.input_city}

{$Orders->Lang('state/province')}:* {$one.input_state}

{$Orders->Lang('postal')}:* {$one.input_postal}

{$Orders->Lang('country')}:* {$one.input_country}

{$Orders->Lang('phone')}: {$one.input_phone}

{$Orders->Lang('fax')}: {$one.input_fax}

{$Orders->Lang('email')}:* {$one.input_email}




{/foreach}


{$Orders->Lang('order_notes')}:
{$Orders->Lang('info_order_notes')}
{$order_notes}



Lang('next')}"/>

{$formend}
{else}
{FrontEndUsers}
{/if}

this is my cmsms info :
------------------------
CMSMS 1.8.2
CMSMailer 2.0
FileManager 1.0.2
MenuManager 1.6.5
ModuleManager 1.4
News 2.10.6
nuSOAP 1.0.2
Printing 1.1.0
Search 1.6.5
ThemeManager 1.1.1
TinyMCE 2.7.3
CGSimpleSmarty 1.4.5
CGExtensions 1.19.6
CGEcommerceBase 1.2.2
FrontEndUsers 1.12.2
SelfRegistration 1.6.5
Products 2.8.7
CGPaymentGatewayBase 1.0.9
Orders 1.10.2
Cart 1.7.2
PaypalGateway 2.2
CustomContent 1.7.3
FRTaxes 1.1.1
PriceBasedShipping 1.1


thanks for your help

kind regards,
Peter
Last edited by pedes on Thu Sep 30, 2010 12:15 pm, edited 1 time in total.
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: Orders ... FEU display if users not logged in ?

Post by pedes »

sorry to BUMP.. this topic

anyone has tried this and has a solution/suggestion ? It used to work in Orders 1.9.1 but now it doesn't with Orders 1.10.2
{if $logged_in}
...Orders invoice template 1...
{else}
{FrontEndUsers}
{/if}

thx
Peter
Peciura

Re: Orders ... FEU display if users not logged in ?

Post by Peciura »

There is smth i do not understand, how on earth "{if $ccuser->loggedin()}"  is not working ?
It returns integer (FEU id) if visitor is logged in otherwise empty value.
Pop up to IRC for "live" assistance.
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

I guess this was solved looking at the thread title, any chance of posting the solution that was arrived at?

Have the same issue with current site I am making, and a site I upgraded.
ridelikeaturtle
Forum Members
Forum Members
Posts: 103
Joined: Thu May 06, 2010 9:22 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by ridelikeaturtle »

I don't know what the solution was to this particular issue, but I can add that using {if $ccuser->loggedin()} in a page's content (i.e., in a {content} tag, like where you'd enter {FrontEndUsers} in the page's WYSIWYG editor) didn't work for me.  Howerver, using it in a template did work correctly.  If this is an initialization issue or what, I don't know (and haven't bothered to check). 

Maybe that will help.
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

Thanks for the suggestion, still fiddling around to see if I can make that work for me.

I've been looking at {$uid|print_r} as well, although that does not seem to change regardless if I am logged in or not.
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: [solved] Orders ... FEU display if users not logged in ?

Post by pedes »

In the orders page:
{if $ccuser->loggedin()} {Orders} {else} {FrontEndUsers} {/if}
hope it will help you out

Kind regards,
Peter
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

Blast, that looked so promising.

I have a page for looking at my car contents.  When I look at my cart contents there is a button at the bottom that loads the page checkout.  In that page I pasted your code in, and it generates this error:

Code: Select all

Fatal error: Call to a member function loggedin() on a non-object in /homez.305/teesside/www/tmp/templates_c/68^%%70^707^707A8977%%content%3Acontent_en.php on line 6
Have you made some order changes to your template to make this work?  For example process page data or something along those lines?
Last edited by luminous on Tue Nov 02, 2010 10:21 pm, edited 1 time in total.
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: [solved] Orders ... FEU display if users not logged in ?

Post by pedes »

this is working for me with the default orders setup

make a page 'orders' and put the call there
{if $ccuser->loggedin()} {Orders} {else} {FrontEndUsers} {/if}
now if you are not loggedin, you select an item in your cart, open the orders page and it should show you the FEU login box and after you have logged in you should see the orders form

this is the basic of the CGEcommerce ... the rest is layout

Kind regards
Peter
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

Hmm, OK, thanks :)

I will try this out on a base install and see where it gets me.  Afaik all the modules have not been fiddled with, but there are so many buttons and so many different ways in which you can break things I will test it out on a sample site as I think I am doing exactly what you suggested.
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: [solved] Orders ... FEU display if users not logged in ?

Post by pedes »

it is working that is for sure, ok you need to play with it for some time ...
i build this with CGEcommerce
www.perlunar.be
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

that is a lovely site :)

One day I will get there.
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

Just setup a test site on a local server.

1)  Basic full install, with Orders, Products, Cart, FEU and dependants.
2)  No templates changed
3)  created a user, and linked modules to each other.
4)  Created a page called orders
5)  checked {orders} worked on that page
6)  checked {FrontEndUsers} worked on that page
7)  then tried {if $ccuser->loggedin()} {Orders} {else} {FrontEndUsers} {/if}

I get the same error as on the development site:
Fatal error: Call to a member function loggedin() on a non-object in C:\xampp\htdocs\test\tmp\templates_c\56^%%70^707^707A8977%%content%3Acontent_en.php on line 5

*scratches head* lol
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [solved] Orders ... FEU display if users not logged in ?

Post by Dr.CSS »

You did install Custom Content module, right?...
luminous
Forum Members
Forum Members
Posts: 168
Joined: Fri May 14, 2010 6:49 pm

Re: [solved] Orders ... FEU display if users not logged in ?

Post by luminous »

Now I understand the tag $ccuser  - thought it was built in like mailto.

Installed said module, things are working really well.  :-[

Noobs...  was trying to understand the modules I had before installing other stuff
Locked

Return to “Modules/Add-Ons”