Sunday 8 April 2012

Drupal Commerce Product Display Module


Commerce Product Display Manager


Hi, my name is Pedro Cambra from Commerce Guys with another Commerce Module Tuesday, & I am here to talk to you about Commerce Product Display Manager, or short name Commerce PDM, which is really a great way to simplify the way that you manage product displays & products.
So you will probably find this module useful if you are managing an online store with Commerce because Commerce has a relationship with products & product displays that is 1:1, so you don't have or have not so many ???tomany ???ations in this scenareo. So if you are using a 1:1 relationship between product displays and products you will probably find this module really really useful. So lets demo[nstrate] it. (So) I have had Commerce Kickstart simple installed, just with the product display manager enabled. And - This module provides two different things.

1.Automatically creates a display.
The first one is that if I add a product in the screen of creating & editing products ...
[admin>commerce>products>add>product - screen headed "Create Product" with "View Products" highlighted]... you will see this widget here on the bottom. [below statuse active/disabled, Change History: widget is headed "Referenced By". It has two links: New display node | Existing Display Node] ... that allows me to create a new display node, or use an existing display node in the same screen that I'm [using for] creating the product.

So let's create a new product.
Give it the SKU 04, [call it] Product 4; that's $40. Suppose - I don't care about the content of the node: I just want a node to display this:  I could select any Poduct Display content type [that] I have [from the "type" dropdown menu]. So.

Just adding the detail: it will create - it has just create a new node, for referencing this product. So I just need to save the product. So I have the Product 4 [on the list]. And if I go to Content [from the top menu in admin] I have Product 4 displayed. It has the title and the product reference field filled-in. So if you have many fields you would probably need to edit this afterwards.

Also notice that this is "published" and not "published and promoted" so if you have Commerce Kickstart, as I do, you will need to go to "Content" to find this new node.

[from "View Products" on the second line of menu options in admin]
So you can also edit your products - say that is Product 4 - I will need, or I want a new node, so I can charge for the product. You can probably see the node ID but you can search for the details [that] you can reference, here. And delete, with a fancy javascript interface so, that's great.

2a.Store> Products> Display Manager tab ..
So the second thing, once you have installed this Display Manager Module, is  this stuff here in the product list. So if you go to Store>Products you'll see your product list and here, in the top, your Display Manager tab. 

And in this Display Manager, you will see a drag-and-drop interface. So you can change your products on display, and assign products, just with drag-and-drop. (And) You can delete both the Products, and the Product displays, add new products, etcetera. So it is a great add-on if you have a need to manage the Products this way, with a drag-and-drop and a javascript interface.

(So) when you save something, it is in a batch process and it is a really cool feature.

2b Using a rule instead of a module
(So) if you don't want to install this module, because you don't want this interface exposed or whatever, there is an issue in the Drupal Commerce queue, which is called "Rules to mirror product displays when products created/updated/deleted". It is self-explanatory. And here you will find a bunch of rules. Probably you will be looking here at the bottom. And I have just proposed one here. So when a Product is created, a display is created with the same information as the product. 

(So) you go back - sorry: - If you go back to your interface, and you access the Rules interface which is in 
Configuration>Rules, you can import one [rule]. So I just paste this code here, and import. (And) you will find your rule which is defined Create Event Display at the bottom here. (So) What is does is that after saving a new Commerce Product, it creates a new Entity. Let's see the details: it's a Node of the type Product Display, with the same title as the Product which we have just been creating, and with the same author. (And also) It relates the product to the product display with this ? add-an-item-to-a-list


With some filters here

the Commerce Display is filled with the Commerce Product. So - erm - you do not need to know a lot about Rules: just understand how the flow goes.

So this thing will do that. If I add a new product, which is SKY -05 (keeping in order)

product 5
[something about price]
I'm not adding a new reference or whatsoever. I save the product: product saved. And if I go to content, I have the Product 5 - ? - product 5 with the SKU related. So you will find in this - in this, er, issue : a bunch or fuyles will probably help you in this task. ? Also for date and delete.

And, also, if you want an interface with the product and the product display on the same page, and you are a little savvy at coding, you could take a look at this excellent post by Amitai on how to use the module Subform to use the interface of Product Display and the Product in the same screen http://www.gizra.com/content/commerce-product-subform
(So) I hope you enjoyed this Commerce Modules Tuesday with a little few extras on the end, and see you in the next one!



Sunday 1 April 2012

Ubercart 3 for Drupal 7 has instructions (except for shipping modules outside the USA)

If you search amazon you will find an ebook about setting up Ubercart 3 on Drupal 7.  I'm backdating this post so it looks up to date.

I bought a copy and worked-through the .pdf highlighting the end of each instruction I had completed. It gets a bit tricky when the text talks about sales, because it starts by giving instructions for downloads, then by giving instructions for physical goods and skating-over the problem of 100 countries in 4 zones with say 3-20 price bands that you want to set for each. I can't review the last bit as I haven't read it yet, but progress now seems possible.

Friday 16 March 2012

I now have two boots products on my front page, with variations. It's the typing of products with commas between them in a little box somewhere that does the trick. In the course of uploading these products in 12 sizes I seem to have uploaded twelve identical pictures too.

Meanwhile I want to do funky 360 degree spins. How to get there?

Step one: search hard disk and email archive for previus attempts. Find http://www.magictoolbox.com/magic360/modules/cscart/ on the web and an email refernce to me buying their magiczoom thing 4 years ago. It doesn't do image spins but anything that's better than two mis-shapen photos of shoes would be a start. Do I have a username or whatever it takes? I've installed the zip module from the web and nothing happens. Maybe I need to find out more.

Step two: search for free alternatives and find Professer Cloud, who's work is Drupalised on https://drupal.org/project/cloud_zoom by Nicholas Thompson. There is some complication about adding lines of code because of a fear of MIT licences. This is frustrating because I am poking in hope of success rather than understanding what I do, and any complication makes success very unlikely.

On the subject of frustration, I saw that Professer Cloud's work is used on a number of sites and happened to pick one with a very good video educational video for Boyz: Click somewhere away from work and non-boyz who might be unsympathetic
http://content.bitsontherun.com/previews/qYkYwiCW-t7UzaS4G
PS If I have got another boy into trouble for posting this link, may I say in his defence that this is mainly a blog about highly productive software which with time and effort can sometimes be self-taught and developed to do more than Word, like run the Whitehouse web site or whatever. So this isn't a rude site your colleague / spouse / pupil was watching, honest. These things are serious to us boyz and deserve a link, that's all.



1.4.12
The various servers I've been testing Drupal on tend to run out of space and memory, so subtleties are abandoned until I learn how to work Drupal on my own hard disk, develop, and then upload. The first part is explained by Tom Geller on a post below called "getting started". I managed last night, but this morning can't see how to retrace steps and get the site on the screen


Wednesday 29 February 2012

Friday 24 February 2012

Today I learned something new: Drupal on shared hosting OK

Thanks whoever commented on the post below:
  • Overlay
  • Dashboard
  • Context Links (this required by Commerce I think but I can skip the other two)
save a lot of memory if disabled.

Thanks whoever posted on https://drupal.org.uk/node/322
  • Several shared hosts do survive the memory demands of Drupal
  • There's one in North Carolina that specialises in Drupal and one in Purley. The thread attracts some people who want support email or phone support and some who have someone else to pay the bill, so it's hard to compare recommendations.
  • Meanwhile Heliohost.org enable one free account per user if it's active. The server is a testbed rather than a hotbed, with maximim add-ons and minimal constraints but 205 other users - few of them active - which this tool shows on a machine in Sacremento, California, routed via Frankfurt to me here in London.
Thanks to two pieces I've skim-read a bit at the start and still learned from.
  • I discovered caching for Drupal.
    "Shared server - no Varnish, no Memcache or APC" on a "case study disaster" told at Drupaldownunder was the clue. Now I know how a database driven site can be made to work as well as a plain html site: you add a cache so that it becomes almost an html site. I have managed to install Memcache; Varnish might not be ready for novices yet and one called "Boost" requries a snippet of .php added to the settings file. Does this need the opening and closing tags? Best avoided for novices just for a while. Evan as I type this I discover "content delivery networks" from skim-reading parts of the same lecture timetable. If I type ".nyud.net" after the domain part of the host for these apes, they load quicker!
  • I discovered that Drupal doesn't let you delete the settings.php file from a previous installation unless you use an FTP program to do it. Discovered from a blog in Australia - just a glance at the first couple of paragraphs confirmed the problem and its solution.
  • https://drupal.org/node/326504 about scalability looks relevant
So. Lots of little things come right in the world sometimes and I will not try to get a job as a bonobo monkey ape in a zoo.



Tuesday 21 February 2012

Drupal 7 doesn't work on cheap hosting. (This is a secret designed to annoy people when they discover).

This is the conclusion I have reached after loads of developer videos failed to tell me: they use dedicated servers or their own hard discs.

The problem seems to be memory limits which have risen by mistake for no particular reason. Just as a Ryan Schama talks about "project creep" in his lecture, Drupal 7 has a Server Memory Creep towards needing an expensive host which nobody advertised or planned: it just happened and caught a lot of people out.

For those on the borderline there are three cacheing products

I find this frustrating because I did a bit of research over a year ago, trying to find out how to make a low-magin, loss making business sell more and at the time Drupal 6 / Ubercart was the fastest-loading software and I searched for days to find the fastest cheapest host. Now the calculation is a different one which rules out this host and this whole school of software together, and probably Drupal software altogether. I have spent over a year trying to learn the XYZ thing while shopping carts have forked and re-built themselves. Now I discover that I should have gone with Virtuemart in the first place. Such is life. If you read about an american going crazy and shooting people in a shopping mall, maybe they had just tried to install Drupal. Or maybe it was looking at the awful overpriced stock in TKMAX that did it. One of the two.

What other annoying things are there in life? Youth is wasted on the young? Trades unions let you down when you get an unfair dismissal? Radio station editors don't like news or music? Maybe I should petend to be a Bonobo Monkey and live in a park where zoo keepers will feed me.


Monday 6 February 2012

Ubercart 3 is go
  • Ubercart 3 more-or-less mostly installs from my one-click Drupal installer and then trying to download one module at a time. Now the essential modules are installed I'm beginning to get fatal memory errors dispute a php.ini file saying that memory ought to be 128MB; I should work down the list of hacks in case something else works.
  • Ubercart 3 still expects complex shipping to be done with a module from the shipping company, which Royal Mail does not supply. I read that you can contribute a country, or maybe edit an existing one, to turn it into Europe or Worldwide which are the two overseas Royal Mail zones. From there it should be possible to write a shipping quote by weight.
  • Ubercart 3 doesn't have any books published about it on Amazon, but it seems pretty similar to Ubercart 2 except that it uses Drupal's standard Rules, apparently, and there is a knobbly bit on the side of a block that is something to do with editing. Probably lots of other things.
  • Someone has written about the two programs in a piece that I haven't read or made sense of -
    http://www.markroyko.com/blog/2011/12/14/ubercart-3-vs-drupal-commerce?utm_source=The+Weekly+Drop&utm_campaign=f26f5aec6a-The_Weekly_Drop_Issue_14_12_22_2011&utm_medium=email
Update 11.2013: Ubercart guides
  • Drupal 7 Ubercart 3 Ecommerce Manual by David Ipswich is a quick guide

  • Ubercart.org list videos by Peter Yarowski some of which are transcribed on this blog

  • Drupal 7 for Dummies (second edition) has an Ubercart 3 chapter which I have not read

For Drupal Commerce

  • Building E-Commerce Sites with Drupal Commerce Cookbook [Paperback]