NutriPrima Launch

Posts: 34
Joined: 03/17/2008

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!

Posts: 5378
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

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!

Posts: 53
Joined: 10/20/2007

Wow! Beautiful site!

Posts: 34
Joined: 03/17/2008

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

Posts: 139
Joined: 08/22/2007
Spreading the word - Ubercart for president.

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

Posts: 5378
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

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

Posts: 34
Joined: 03/17/2008

@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

Posts: 89
Joined: 06/24/2008

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

Posts: 34
Joined: 03/17/2008

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');
  }

Posts: 89
Joined: 06/24/2008

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?

Posts: 34
Joined: 03/17/2008

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.

Posts: 89
Joined: 06/24/2008

Hi!

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

Posts: 34
Joined: 03/17/2008

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";
}