Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to change "Submit" button Properties to different url?

How to change "Submit" button Properties to different url?

Locked

Views: 9,152

Results 21 to 28 of 28
This thread is locked. New replies are disabled.
18 Oct 2007, 3:50 PM
#21
actorxfactor avatar

actorxfactor

New Zenner

Join Date:
Aug 2007
Posts:
84
Plugin Contributions:
0

How to change "Submit" button Properties to different url?

DrByte:

Well, yes, that would be a problem.

... which leads me back to my prior statement ... using login or existence of an account as your only security check is flawed.

You need to let anyone create an account.
And then simply restrict non-authorized-users from accessing certain areas ... via the Group feature I mentioned previously.

Hi I have set up a group with no discounts, but there does not seem to be any other configuration options available.

How would I go about restricting non authorized users from accessing certain areas?
How does the customer become part of the group?

Could I use the "Customer must be authorized to browse" option in admin, and customize the option so that customers must be authorized to browse "members only" pages.

18 Oct 2007, 8:21 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How to change "Submit" button Properties to different url?

It's going to require some custom coding.

actorxfactor:

How does the customer become part of the group?Normally you'd have to manually add them from within the Admin->Customers->Customers area ... edit the customer, make them a member of the group via the pulldown, and save the changes.

actorxfactor:

How would I go about restricting non authorized users from accessing certain areas?Add code to your ez-pages section that checks for the correct page number ... adapting the page-number-check from your former attempt and combining it with a check whether the current user is a member of the appropriate group.

  $group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
  if ($group_query->fields['customers_group_pricing'] == 'THE_NUMBER_OF_MY_VALID_GROUP_GOES_HERE') {
    //  let me see the page
    // logic to display the page goes here
  } else {
     // cannot see the page -- ie: redirect to a page explaining to buy a membership for access
  }

actorxfactor:

Could I use the "Customer must be authorized to browse" option in admin, and customize the option so that customers must be authorized to browse "members only" pages.No, that will only confuse things

19 Oct 2007, 12:35 AM
#23
actorxfactor avatar

actorxfactor

New Zenner

Join Date:
Aug 2007
Posts:
84
Plugin Contributions:
0

Re: How to change "Submit" button Properties to different url?

DrByte:

It's going to require some custom coding.
Normally you'd have to manually add them from within the Admin->Customers->Customers area ... edit the customer, make them a member of the group via the pulldown, and save the changes.

Add code to your ez-pages section that checks for the correct page number ... adapting the page-number-check from your former attempt and combining it with a check whether the current user is a member of the appropriate group.

$group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($group_query->fields['customers_group_pricing'] == 'THE_NUMBER_OF_MY_VALID_GROUP_GOES_HERE') {
// let me see the page
// logic to display the page goes here
} else {
// cannot see the page -- ie: redirect to a page explaining to buy a membership for access
}


You're very kind, thanks for taking the time to help me:smile:

re: the code you have written,

Is this in place of the original custom code I used or to replace it?

How specific should the logic to display the page be? Is there a method?

> cannot see the page -- ie: redirect to a page explaining to buy a membership for access

Not at all sure how to implement this.
19 Oct 2007, 1:02 AM
#24
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How to change "Submit" button Properties to different url?

actorxfactor:

re: the code you have written,

Is this in place of the original custom code I used or to replace it?Where had you inserted your old custom code originally?

What is your overall structure? Is this correct?
a. everyone can see available auditions
b. must buy a membership to have access to location/appointment details of those auditions
c. available auditions are "products"
d. registration/location details are on various EZ-pages
e. there are a few EZ-pages that contain free content

Am I missing anything?

19 Oct 2007, 9:33 AM
#25
actorxfactor avatar

actorxfactor

New Zenner

Join Date:
Aug 2007
Posts:
84
Plugin Contributions:
0

Re: How to change "Submit" button Properties to different url?

DrByte:

Where had you inserted your old custom code originally?

What is your overall structure? Is this correct?
a. everyone can see available auditions
b. must buy a membership to have access to location/appointment details of those auditions
c. available auditions are "products"
d. registration/location details are on various EZ-pages
e. there are a few EZ-pages that contain free content

Am I missing anything?

Sorry I forgot to mention that I have uploaded a different version of the site as I had modded it beyond recognition.
The shopping cart is now returned to it's former glory.
Instead of auditions as "products" I was planning to use Define Pages to display the "freeview" part of the audition and EZ Pages for the "Authorized Members" (full details) part of the audition. The only products being the subscription charges.

I inserted the old custom code in header_php.php

19 Oct 2007, 12:05 PM
#26
actorxfactor avatar

actorxfactor

New Zenner

Join Date:
Aug 2007
Posts:
84
Plugin Contributions:
0

Re: How to change "Submit" button Properties to different url?

to be more precise

ez_pages ("page") header_php.php

20 Oct 2007, 9:38 AM
#27
actorxfactor avatar

actorxfactor

New Zenner

Join Date:
Aug 2007
Posts:
84
Plugin Contributions:
0

Re: How to change "Submit" button Properties to different url?

Just to update you.> What is your overall structure? Is this correct?

a. everyone can see available auditions
b. must buy a membership to have access to location/appointment details of those auditions
c. available auditions are "products"
d. registration/location details are on various EZ-pages
e. there are a few EZ-pages that contain free content

c. available auditions are now on EZ pages!

(Creating define pages is too much hassle)

Thanks

Gordon

2 Jun 2009, 5:21 PM
#28
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: How to change "Submit" button Properties to different url?

Dr Byte,
I hope this is the right section to post this in: I'm integrating my zencart site with a Joomla frontend using the Jzen module for Joomla. I need to use the zencart login page as the joomla login does not collect enough detail, and i have got most things working now.
I would like to add a second login button to the zencart login page so that i can have two buttons - the normal zencart 'login' button which then takes the user to the zenvart shopfront; and then a second button that when clicked will log the user in but then take them to the joomla homepage (or even better the last page they viewed).
This would then give the user the choice of which page to go to after tlogging on rather than having to go to the zencart shop 'homepage'.
I have copied the line in the tpl_login.php file so that i now have two normal login buttons on the login page but they both obviously return the user to the zencart homepage. I was hopeing that this might be something as simple as changing a url somewhere, but suspect it is more complicated!
Can this be done?
Many thanks
Ben