In SAGE Payment Solutions’ virtual terminal, transactions have a memo field. However, the gateway’s HTTPS Bankcard Specifications API documentation doesn’t mention a way to programmatically set this field. Using the HTTPS POST API, is there a way to pass in memo text? Continue reading
Category Archives: Programming
Show Insert File Instead of Record Audio Dialog – FileMaker Pro Container Fields
Click on a container field in a FileMaker Pro form and you’ll be presented with a Record Audio dialog. To store a file or other non-audio content, you must right-click on the field and then choose Insert File (or Insert Image or Insert Object, etc.) from the pop-up menu. When a container field is primarily used to store non-audio content, the required right-clicking quickly gets old. How do you modify a container field’s behavior so that a left-click displays the Insert File dialog? Continue reading
SET FMTONLY ON Changes SQL Control-of-Flow Statement Processing
The other day, my friend Jonathan (of Camenisch Creative) surprised me by pointing out that SET FMTONLY ON changes the way Microsoft SQL Server processes control-of-flow statements (IF…ELSE…END, GOTO, RETURN, etc.)
When SET FMTONLY is OFF (the default), SQL Server processes control-of-flow statements normally. In the case of an IF statement, SQL Server determines which conditional expression evaluates to true and then executes the code associated with that expression. Turn FMTONLY to ON and SQL Server executes every conditional branch, even those associated with conditions evaluating to false!
Programmatically Setting a Magento Item’s Price When Adding It to Cart
Using code, how would we give a Magento item a one-time special price then add that item to the shopping cart?
The process is simple:
- Create an instance of the Magento product,
- give it a custom price by calling setSpecialPrice,
- then save the product instance (store must be running as the admin store).
- Next, grab the Magento cart object (a singleton),
- add the product instance to the cart,
- then save the cart.
Can you force .Net garbage collection?
Confusion exists on whether .Net’s GC.Collect() simply suggests or actually forces garbage collection (GC). Thankfully, developers don’t usually need to worry about such mundane details. However, in unusual circumstances—like WeakReference testing (which may rely on predictable, guaranteed destruction of unneeded objects)—particulars like this become vitally important. Continue reading
New Feature: Make the Store Address’s First Line Stand Out on Magento PDF Invoices
Want to make your store name stand out on your PDF invoice (example to the right)?
By default, Magento’s PDF invoice displays your entire store address/information block using the same font/font size. Now, Ben Gribaudo’s Customizable PDF Invoice Module gives you separate font/font size settings for both the store address’s first line and the rest of the address. Continue reading
WPF: Separate Grids, Auto-Sized Columns/Rows With Synchronized Dimensions
The design specification calls for two Grids. One column in each is to auto-size its width to its content. “No problem—<ColumnDefinition Width=”Auto” /> will take care of that,” you think. Then you notice a footnote: “The widths both auto-sized columns should match. Both columns should be the width of the wider column’s content.”
How do you implement this? Continue reading
New Feature: Display Coupon Code on Magento PDF Invoice
This new feature replaces Magento’s PDF invoice’s default “Discount” line with “Coupon (code)” when a coupon has been used on the associated order. Continue reading
Released: Customizable PDF Invoice Module for Magento
It’s released! Use Ben Gribaudo’s Customizable PDF Invoice Module to style your Magento PDF invoices.
- Choose the font/font size for each component on the invoice. Use one font for store info, another for item details, make the totals section larger….
- Set the page size and margin. If you’d like, output invoices as letter-sized instead of Magento’s A4 default. Continue reading
SSRS: Dataset Field List Is Empty Even After Refresh Fields
Problem: Microsoft SQL Server Reporting Services won’t populate the data set’s field list. Clicking Refresh Fields does nothing—the field list remains empty.
Is something wrong with the query? Is there a database permissions issue? Let’s check. Click the Query Designer button, then the red “!” (execute) icon. The query runs and…a normal result set is returned. Since the query executes correctly, the query and permissions must be fine. So, the blank field list indicates an SSRS bug—correct? Not necessarily. Continue reading
