Update. Was able to get it to work by doing the following ...
Go to app/code/core/Mage/Eav/Model/Entity/Increment/abstract.php it appears that the if(empty($padLength) ) is evaluating to true. When I change $padLength to 0 it works even though it should have been picking up 0 padding which I set in the eav_entity_type table.
$padLength = $this->getData(’pad_length’);
if (empty($padLength)) {
$padLength = 0; // this was 8
this is /app/code/local/Pulpmedia/ConsecutiveNumbering/Entity/Increment/Numeric.php (for testing with a random number):
<?php
class Pulpmedia_ConsecutiveNumbering_Model_Entity_Increment_Numeric extends Mage_Eav_Model_Entity_Increment_Numeric { public function getNextId() { $next = rand(1000,100000);
return $this->format($next); } }
... and this is my /app/code/local/Pulpmedia/ConsecutiveNumbering/Model/ConsecutiveNumbering.php
<?php class Pulpmedia_ConsecutiveNumbering_Model_ConsecutiveNumbering extends Mage_Core_Model_Abstract
{
}
I tried to place an order an do not get a random number between 1000 and 100000. Could anyone help me here please?
anybody got a good idea to sync the invoice/order number of multiple stores? should order number and invoice number always be the same? or do you think it is better to have a different one?
we have three stores (= six store views) and we think about having different order numbers and consecutive numbering of all stores for invoice.
does anybody have a good idea how to code this (in general)? i would post an extension here immediately, if someone’s got a good idea for this…
if you do it this way will it cause any problems on updates?
I want to have my order number similar to amazon.
i want to use the 9 numbers. start it from 465784268 or what ever....ether increment in 9 for every order or just have it random. (wold be nice to have an extra 3 digit number for each order, like a store code)
@nafna1000: I don’t think so. --- I have a full working demoshop (copy of liveshop) and will try updating to 1.1.5 here. will post my results here, if it works without problems.