Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Command line parameters - how to?

    I would need to enter my own - primarily at "..../index.php?main_page=create_account". I would like to include the sponsor in the link.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Command line parameters - how to?

    Quote Originally Posted by kalastaja View Post
    I would need to enter my own - primarily at "..../index.php?main_page=create_account". I would like to include the sponsor in the link.
    Please could you provide a little detail about what you want to do. There's not quite enough here to really understand what you're wanting to do.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Command line parameters - how to?

    Sorry! I would like to make a link to my shop that contains the sponsor information, i.e. when the customer clicks on the link it goes straight to the create_account-page and the sponsor-field has the value from the link.

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Command line parameters - how to?

    There isn't anything built into Zen Cart to do this, but if you have PHP programming skills it's not too difficult.

    I'd recommend overriding the init_customer_auth.php file (there's an overrides folder in the includes/init_includes/ folder for this) to add some code at the end to test if a user is not logged in and has a sponsor parameter in the URL. If so, you would take whatever note you need to there of this (e.g. updating a sponsor count in the database) and then do a zen_redirect to the create_account screen.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Command line parameters - how to?

    Ok, thanks.

  6. #6
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Command line parameters - how to?

    I was originally thinking more in terms of cPath/products_id-parameters being handed along and catching the sponsor on the create_account-page!?

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Command line parameters - how to?

    I wouldn't try to keep handing it along while a visitor browses the site, it's likely to get lost that way.

    Better would be to capture it where I said and write it to a cookie. Then add some code to the includes/modules/create_account_success/header_php.php file to look for the cookie if an account has been created, and if so read in and use the sponsor information there.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Command line parameters - how to?

    Thank's kuroi, I see your point!

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Command line parameters - how to?

    Or if the cookie route isn't needed, instead of setting a cookie, just set the same session variable that the ot_coupon module sets, and in your admin set your customer-referrals setting to use the first-redeemed-coupon as the referral code set during create-account.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Command line parameters - how to?

    This "piggy-back" I like even better.

 

 

Similar Threads

  1. CURL Command-line
    By webstar in forum Basic Configuration
    Replies: 2
    Last Post: 24 Nov 2009, 10:34 PM
  2. Command line run of update_product.php
    By liderbug in forum General Questions
    Replies: 0
    Last Post: 12 Jul 2009, 04:19 AM
  3. SSH Command Line upload and install
    By kiddieshop in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 12 Feb 2009, 02:30 AM
  4. Easy Populate From Command Line
    By jmycr in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 Aug 2008, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR