I like lemonade.

ubercart

Ubercart 1.9 for Drupal 5 and Ubercart 2.1 for Drupal 6

The current release version is Ubercart 1.9 for Drupal 5 and Ubercart 2.1 for Drupal 6.

Visit the project page on http://drupal.org/project/ubercart

Ubercart 2.x Price Handler and Old Price

Ubercart 2.x introduced a new way of handling product prices. It is called price_handler().

This is very nice, and most of the discount and TAX modules are using this new function to override the product price, but what if you need the new price and the old price on the same product?

Let's say you would like to show your visitors the product price before it was discounted.

You obviously should not change the condribution modules or the Ubercart core. You should just simply create your own module or use the general module you have created earlier (You got one, right?) and just paste the following lines at the bottom.

This function will create the price handler. Don't forget to replace 'your_module' with your module name everywhere.

/**
* Implementation of hook_uc_price_handler().
*/
function your_module_uc_price_handler() {
return array(
'alter' => array(
'title' => t('Old price handler'),
'description' => t('Adds old price to product.'),
'callback' => 'your_module_price_handler_alter',
),
);
}

 

This function will save the original Sell Price and put it on the node object for further use.

/**
* This is just a function to save the original sell price and put it on the node.
*/
function your_module_price_handler_alter(&$price_info, &$context, &$options) {
if (isset($context['subject']['node'])
&& $context['subject']['field'] == 'sell_price'
&& !isset($context['subject']['node']->old_price)) {
$node = $context['subject']['node'];
$context['subject']['node']->old_price = $node->sell_price;
}
}

Ubercart RC2 released and how to hide the Qty. field from cart

This post is not about the new Ubercart release but about hiding the Qty. field on the cart page. ;)

add this code to your new/old module to make the Qty. field go away.


<?php
function mymodule_form_alter(&$form, $form_state, $form_id) {
	if ($form_id == 'uc_cart_view_form') {
		//This line disables qty column
		unset($form['items']['#columns']['qty']);
		//This loop denies access to all qty fields for the form
		foreach($form['items'] as &$item)  {
			if (is_array($item) & isset($item['qty'])) {
				$item['qty']['#access'] = 0;
			}
		}
	}
}
?>

Super! Ubercart 2.0 beta released for Drupal 6

Ubercart has a beta release for use with Drupal 6, and it's ready to have the snot kicked out of it by some hard-hitting testers. Most of the changes from Ubercart 1 are internal, so experiencing Drupal 6 will probably be the biggest difference.

Ubercart 1.3 Released

Ubercart 1.3 has been released a few days ago.

ubercart.org:

Well, I'm heading out for the day without accomplishing much coding... those days aren't as much fun as the days we get to hack away on core, but we did manage to get other Ubercart related work done.

Ubercart 1.0 RC 2

Just a quick news, Ubercart 1.0 RC 2 is out now.
find it on: http://www.ubercart.org/

Discount module

Az új Discount module jól mûködik együtt az Ubercart Beta 6 verzióval.

Ubercart magyar fordítás

*UPDATE*
* Figyelem! Ez a bejegyzés idejét múlt.
Ubercart: www.ubercart.org
Magyar fordítás: http://l10n.privnet.biz/translate/languages/hu

*1 Legfrissebb Ubercart verzió: 1.6

Tartalom

Szóval, külön választottam a híreket és a blogot. Ez azért jó, mert így tudok az oldallal kapcsolatos információkat írni, teljesen függetlenül a blogtól. Jó mi?