12 replies [Last post]
JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
Was this information Helpful?

Visit NutriPrima.com

This is my second go at an Ubercart site (my first can be found here). We currently only have one product available for purchase but several more will be coming in the next couple weeks.

This site features a pretty complex subscription system built off of Ryan's uc_recurring module that allows for user-selectable autoship subscriptions on all products as well as forced subscriptions on certain products. It also allows users to select their delivery interval and request immediate reorder at any time.

Another feature of the site is its ability to auto process orders. It takes all new orders, exports them as an XML file, and then uploads them to a remote FTP server for processing and shipping from our fulfillment center.

My love for Ubercart keeps growing the more I work with it and I owe a lot to the wonderful devs here. Keep up the great work!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: NutriPrima Launch

Great job on a second sharp site... I'm curious where you got your shopping cart icon from... I like it. Eye-wink I'd love to do some cart redesign based on a few different models I've seen during the D6 phase.

Also, the tabs on product pages are great. Was this a custom solution, plugin, or something else?

Congrats again on a job well done!

JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
Re: Re: NutriPrima Launch

Glad you guys like it.

@Ryan

Cart icon: http://www.bartelme.at/journal/archive/shopping_cart_icon

Tabs: I used jqueryUI for the tab functionality and custom designed the tabs themselves. Gave me a headache to do it but I think it turned out well. Smiling

stephthegeek's picture
Offline
Theminator
Joined: 10/20/2007
Juice: 575
Re: NutriPrima Launch

Wow! Beautiful site!

Gorgeous original Drupal themes (and Ubercart themes!) ~ Psst: more Ubercart themes on our new site

Insurrectus's picture
Offline
Spreading the word - Ubercart for president.
Joined: 08/22/2007
Juice: 364
Re: NutriPrima Launch

How did you setup your order export XML function? Did you write a module or is this custom? Will you share it with the community?

Thanks,
Clint

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: NutriPrima Launch

Any idea of the license on that icon... looks like he's made it public domain, so I'm curious if it could be included in a GPL package. Puzzled

JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
@Insurrectus I was on a

@Insurrectus

I was on a tight deadline with this site so I didn't have the luxury of setting up a nice backend for it and had to hardcode some things due to the rush. I plan on getting it to the community, but I just don't have the time at the moment.

@Ryan

I'm not sure of the exact license on the icon -- I am betting he wouldn't mind if you include it in a package of some kind. Just shoot him an email and ask. Smiling

himagarwal's picture
Offline
Joined: 06/24/2008
Juice: 295
Re: NutriPrima Launch

awesome website. what did you used for subscription? I'm using newsletter module but couldn't find a way to theme it....

JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
Re: Re: NutriPrima Launch

I used the Simplenews module and customized it via CSS, Javascript and hook_form_alter.

Here's how I used hook_form_alter if it helps you in any way. Smiling

  if($form_id == 'simplenews_block_form_1') {
 
  $settings = null;
   
  $form['mail']['#title'] = '';
    $form['display_mail']['#title'] = '';
  $form['action']['#type'] = 'hidden';
    $form['submit']['#button_type'] = 'image';
  if ($form['submit']['#value'] == 'Unsubscribe'){
    $form['submit']['#attributes'] = array(
'src' => base_path().path_to_theme().'/images/homepage_newsletter-remove.png',
'alt' => 'Remove me from your list.',
'class' => 'none'
);
} else {
    $form['submit']['#attributes'] = array(
'src' => base_path().path_to_theme().'/images/homepage_newsletter-submit.png',
'alt' => 'Sign Up!',
'class' => 'none'
);
}
  $settings = array('newsletter' => array(
      'emailaddress' => 'Email Address',
    ));
    drupal_add_js($settings, 'setting');
    drupal_add_js($module_path .'/newsletter.js', 'module');
  }
himagarwal's picture
Offline
Joined: 06/24/2008
Juice: 295
Re: Re: Re: NutriPrima Launch

thanks for the code. i made a custom module call simplenews_theme using your code as shown below but nothing happens.....

function simplenews_theme_form_alter($form_id, &$form) {
  if($form_id == 'simplenews_block_form_1') {

did i missed something?

JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
Re: Re: Re: Re: NutriPrima Launch

Are you sure the form_id (simplenews_block_form_1) is the same as mine? Depending on how many blocks you have activated via simplenews, yours could be different.

himagarwal's picture
Offline
Joined: 06/24/2008
Juice: 295
Hi! I'm using the same

Hi!

I'm using the same form_id (simplenews_block_form_1) as of yours. Simplenews block is enabled for the frontpage only.

JaceRider's picture
Offline
Joined: 03/17/2008
Juice: 98
Re: Hi! I'm using the same

So... nothing is happening? Or the subscribe button isn't turning into an image? If nothing is happening then I'm not sure what might be going on. If the submit button just isn't displaying an image... then you will need to add the following to your template.php theme file.

// Stylize Submit buttons
function phptemplate_button($element) {
  // following lines are copied directly from form.inc core file:
  // Make sure not to overwrite classes
  if (isset($element['#attributes']['class'])) {
    $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'];
  }
  else {
    $element['#attributes']['class'] = 'form-'. $element['#button_type'];
  }
  // My change is type="' . (($element['#button_type'] == "image") ? 'image' : 'submit' ) . '"
  return '<input type="' . (($element['#button_type'] == "image") ? 'image' : 'submit' ) . '" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ')  .'id="'. $element['#id'].'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
}