Post by dizarter » Tue Dec 13, 2011 3:51 am

Make pagination theme overridable on a per theme basis, instead of hardcoding the layout in system/library/pagination.php

Also, make (# Pages) text "plural sensitive" (if there is just 1 page of results it should say (1 page), and only when there are more pages it should say (# pages)

New member

Posts

Joined
Tue Oct 11, 2011 7:33 am

Post by jefrey1983 » Tue Dec 13, 2011 4:23 am

Feature Request.
Catalogue Mode
Blog Page
Improved Affiliate System

User avatar
Active Member

Posts

Joined
Sat Jan 30, 2010 6:58 pm

Post by hunch » Tue Dec 13, 2011 8:54 am

Johnathan wrote:Zipcode-based tax systems aren't accurate for the entire U.S. tax system, which is why I think Xsecrets mentioned it would take so long to set up.
Yes, each state has the ability to create their own tax laws in an attempt to be more confusing and harder to manage than their neighbors.

In Sunny California, we have a state tax of 7.25%. If the ship to address is in the same district as your business, and if the district has an additional tax, we are required to collect it. For Los Angeles County (where I am located), I need to collect an additional 1.50%

Store owners are not obligated to collect taxes for other districts that they ship to. If they do collect the tax though, they must pay it. The consumer is expected to pay a use tax on their own.

So, with that all said, I managed to hack together a solution by adding a postcode table that joins the zone table:

Code: Select all

mysql> select * from zone_postcode limit 5;
+------------------+---------+----------+
| zone_postcode_id | zone_id | postcode |
+------------------+---------+----------+
|                1 |    3624 | 90001    |
|                2 |    3624 | 90002    |
|                3 |    3624 | 90003    |
|                4 |    3624 | 90004    |
|                5 |    3624 | 90005    |
+------------------+---------+----------+
I probably could have gotten fancy and limited the size of the table by using ranges within the data, but I did call this a hack...I only added the postcodes for the district I care about (Los Angeles County).

I also extended the geo_zone table by adding a postcode_flag.

Code: Select all

mysql> select * from geo_zone;
+-------------+------------------------------+------------------------------+---------------------+---------------------+---------------+
| geo_zone_id | name                         | description                  | date_modified       | date_added          | postcode_flag |
+-------------+------------------------------+------------------------------+---------------------+---------------------+---------------+
|           3 | UK VAT Zone                  | UK VAT                       | 2010-02-26 22:33:24 | 2009-01-06 23:26:25 |             0 |
|           4 | UK Shipping                  | UK Shipping Zones            | 2010-12-15 15:18:13 | 2009-06-23 01:14:53 |             0 |
|           5 | US Shipping                  | US Shipping                  | 0000-00-00 00:00:00 | 2011-12-10 14:20:37 |             0 |
|           6 | CA Sales Tax                 | California Sales Tax         | 0000-00-00 00:00:00 | 2011-12-10 14:21:38 |             0 |
|           7 | Los Angeles County Sales Tax | Los Angeles County Sales Tax | 2011-12-12 13:14:13 | 2011-12-10 14:25:55 |             1 |
+-------------+------------------------------+------------------------------+---------------------+---------------------+---------------+
5 rows in set (0.00 sec)

I didn't bother building in the forms to manage the data in the admin (just went into SQL).

I then altered tax.php to use the new fields. Actually I rewrote the getRates function call as some of the code appeared to be duplicated.

Code: Select all

    public function getRates($value, $tax_class_id) {
		$tax_rates = array();
		$country_id = 0;
		$zone_id = 0;
		$postcode = '';
	
	
		if ($this->customer->isLogged()) {
			$customer_group_id = $this->customer->getCustomerGroupId();
		} else {
			$customer_group_id = $this->config->get('config_customer_group_id');
		}
	
		if ($this->shipping_address) {
			$country_id = $this->shipping_address['country_id'];
			$zone_id = $this->shipping_address['zone_id'];
			$postcode = $this->shipping_address['postcode'];
	
		}elsif ($this->payment_address){
			$country_id = $this->payment_address['country_id'];
			$zone_id = $this->payment_address['zone_id'];
			$postcode = $this->payment_address['postcode'];
			
		}elsif ($this->store_address){
			$country_id = $this->store_address['country_id'];
			$zone_id = $this->store_address['zone_id'];
			$postcode = $this->store_address['postcode'];
	
		}
		
		
		$q = 		"SELECT tr2.tax_rate_id, tr2.name, tr2.rate, tr2.type, tr1.priority ";
		$q = $q .	"FROM " . DB_PREFIX . "tax_rule tr1 ";
		$q = $q .	"LEFT JOIN " . DB_PREFIX . "tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) ";
		$q = $q .	"INNER JOIN " . DB_PREFIX . "tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) ";
		$q = $q .	"LEFT JOIN " . DB_PREFIX . "zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) ";
		$q = $q .	"LEFT JOIN " . DB_PREFIX . "geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) ";
		$q = $q .	"LEFT JOIN " . DB_PREFIX . "zone_postcode zpc ON (z2gz.zone_id = zpc.zone_id and gz.postcode_flag = '1') ";
		$q = $q .	"WHERE tr1.tax_class_id = '" . (int)$tax_class_id . "' ";
		$q = $q .	"AND tr1.based = 'shipping' ";
		$q = $q .	"AND tr2cg.customer_group_id = '" . (int)$customer_group_id . "' ";
		$q = $q .	"AND z2gz.country_id = '" . (int)$country_id . "' ";
		$q = $q .	"AND (z2gz.zone_id = '0' OR z2gz.zone_id = '" . (int)$zone_id . "' ";
		$q = $q .	"AND (z2gz.zone_id = '0' OR gz.postcode_flag='0' OR (gz.postcode_flag= '1' ";
		$q = $q .	"AND zpc.postcode='" . (char)$postcode . "'))) ";
		$q = $q .	"ORDER BY tr1.priority ASC";
		
		$tax_query = $this->db->query($q);
	
		foreach ($tax_query->rows as $result) {
			$tax_rates[$result['tax_rate_id']] = array(
				'tax_rate_id' => $result['tax_rate_id'],
				'name'	=> $result['name'],
				'rate'	=> $result['rate'],
				'type'	=> $result['type'],
				'priority'    => $result['priority']
			);
		}
	
		$tax_rate_data = array();
		foreach ($tax_rates as $tax_rate) {
			if (isset($tax_rate_data[$tax_rate['tax_rate_id']])) {
				$amount = $tax_rate_data[$tax_rate['tax_rate_id']]['amount'];
			} else {
				$amount = 0;
			}
	
			if ($tax_rate['type'] == 'F') {
				$amount += $tax_rate['rate'];
			} elseif ($tax_rate['type'] == 'P') {
				$amount += ($value / 100 * $tax_rate['rate']);
			}
	
			$tax_rate_data[$tax_rate['tax_rate_id']] = array(
				'tax_rate_id' => $tax_rate['tax_rate_id'],
				'name'	=> $tax_rate['name'],
				'type'	=> $tax_rate['type'],
				'amount'      => $amount
			);
		}
	
		return $tax_rate_data;
	}

I also altered the various functions that set the variables for country_id and zone_id to also capture the postcode.
e.g.

Code: Select all

        public function setShippingAddress($country_id, $zone_id, $postcode) {
                $this->shipping_address = array(
                        'country_id' => $country_id,
                        'zone_id'    => $zone_id,
                        'postcode'   => $postcode
                );

So, the thing appears to be working when I go to purchase.
Sub-Total: $365.00
First-Class Mail Package: $1.71
CA Sales Tax: $26.46
LA County District Tax: $5.48
Total: $398.65
I would love to see something like this get picked up for v1.6 as it allows for taxes to be managed as they are today or extended down to the postcode level if desired. And if it makes into the core, I don't have to worry about future compatibility ;)

Newbie

Posts

Joined
Tue Dec 13, 2011 8:13 am

Post by radu » Thu Dec 15, 2011 12:36 am

It seems this is the proper thread to post suggestions for R.next.
1. One Big thing were things could be much easier for developers would be better support for plugins. Instead of having to use VQmod or code hacks, all plugins should reside in a separate folder (like vqmod does it, but shouldn't be on-the-fly code hacks, because these are dependent on core version and how code changes from version to version, and then they could break). One really smart approach (very MVC, as well) is used by the YII framework, should you guys have a chance to give it a look. All plugins/modules are droped in their folders and hooked/included in the bootstrap config file.
2. wishlist: customer should be able to make wishlists public (and share them), and admins should be able to see wishlists from customers in a more simple manner (like orders are displayed) and eventually with some statistics on what's on the wishlists.

Newbie

Posts

Joined
Sun Dec 04, 2011 2:57 am

Post by mmreed » Tue Dec 20, 2011 11:00 am

Id love to see the ability to set a URL to an external image rather than have to upload the image for product.

We have suppliers that keep all the product images fresh and current - by being able to say product1 image is http://www.supplier.com/images/product1.jpg we would always have the newest image

it would also save on space since we have over 25000 products. Not having to host them would be great!!!!

It would also make adding new items a very simply CSV flat file import where we can specify the Image URL.

It could be a flag on the product - Image: URL or Local. Set that and then set the image location in the cvs... just an idea..

but please... a number of us really need to be able to do this. 3dcart allows this, and presta shop does to some extent.

Newbie

Posts

Joined
Thu Aug 04, 2011 8:46 pm

Post by Xsecrets » Tue Dec 20, 2011 11:52 am

mmreed wrote:Id love to see the ability to set a URL to an external image rather than have to upload the image for product.

We have suppliers that keep all the product images fresh and current - by being able to say product1 image is http://www.supplier.com/images/product1.jpg we would always have the newest image

it would also save on space since we have over 25000 products. Not having to host them would be great!!!!

It would also make adding new items a very simply CSV flat file import where we can specify the Image URL.

It could be a flag on the product - Image: URL or Local. Set that and then set the image location in the cvs... just an idea..

but please... a number of us really need to be able to do this. 3dcart allows this, and presta shop does to some extent.
just out of curiosity how would you propose handling the image sizes if you don't host the images? do you just set the image size and let the browser butcher it?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by mmreed » Tue Dec 20, 2011 12:07 pm

Xsecrets wrote:
mmreed wrote:Id love to see the ability to set a URL to an external image rather than have to upload the image for product.

We have suppliers that keep all the product images fresh and current - by being able to say product1 image is http://www.supplier.com/images/product1.jpg we would always have the newest image

it would also save on space since we have over 25000 products. Not having to host them would be great!!!!

It would also make adding new items a very simply CSV flat file import where we can specify the Image URL.

It could be a flag on the product - Image: URL or Local. Set that and then set the image location in the cvs... just an idea..

but please... a number of us really need to be able to do this. 3dcart allows this, and presta shop does to some extent.
just out of curiosity how would you propose handling the image sizes if you don't host the images? do you just set the image size and let the browser butcher it?

No clue. I'm not a programmer. But prestashop and 3dcart have this so maybe the devs can get ideas there. There surely has to be a way open cart can accomplish this.

Newbie

Posts

Joined
Thu Aug 04, 2011 8:46 pm

Post by alex1 » Tue Dec 20, 2011 12:50 pm

If the image is remote, you could also set the width and height when displaying it, based on opencart's settings.

however, it's always better practice to host your own images. What is the supplier updates their site, and changes their url structure? You're going to go through and update all your image references? not scalable....

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by mmreed » Tue Dec 20, 2011 7:18 pm

alex1 wrote:If the image is remote, you could also set the width and height when displaying it, based on opencart's settings.

however, it's always better practice to host your own images. What is the supplier updates their site, and changes their url structure? You're going to go through and update all your image references? not scalable....
In this case the supplier puts those images out for this purpose and states the structure will not change. They encourage using URL to keep images fresh.

Newbie

Posts

Joined
Thu Aug 04, 2011 8:46 pm

Post by zChris » Tue Dec 20, 2011 8:08 pm

Feature requests

1. A option to make groups have a discount thats sitewide. Ive made a mod of it today its in general, but i would like to see it builtin as default

2. Commenting the code so its easier to build modules and edit the core

3. Options to add extra tabs to product page.

4. Oh yeah, to save the seo urls somehwere so its easy to extract. (need this for a site that list products)

Ill update this if i get anymore ideas :)

http://www.gbtrading.se - villalarm, hemlarm och gsmlarm.


New member

Posts

Joined
Mon Dec 12, 2011 6:24 pm

Post by cartpro » Mon Dec 26, 2011 7:09 pm

mmreed wrote:Id love to see the ability to set a URL to an external image rather than have to upload the image for product.

We have suppliers that keep all the product images fresh and current - by being able to say product1 image is http://www.supplier.com/images/product1.jpg we would always have the newest image

it would also save on space since we have over 25000 products. Not having to host them would be great!!!!

It would also make adding new items a very simply CSV flat file import where we can specify the Image URL.

It could be a flag on the product - Image: URL or Local. Set that and then set the image location in the cvs... just an idea..

but please... a number of us really need to be able to do this. 3dcart allows this, and presta shop does to some extent.
This is quite possible with the small change in the image.php. All it has to do is, it has to look for the image url pattern and decide if this is a local image or the remote image.

Regarding re-sizing, I use phpThumb to resize the images from the external url and works great.

Ofcourse, the one I implemented is much more complex than simple url. My client wanted to use the CDNs for image and it could be any number of CDNs.

Extensions: Multi-vendor extension
Shipping Modules: SuperShip Pro

Multi-Vendor Marketplace:Opencartmarketplace.com
IceCat to Opencart: Import millions of IceCat products to Opencart


New member

Posts

Joined
Fri Oct 29, 2010 1:50 am

Post by labeshops » Tue Dec 27, 2011 2:41 am

mmreed wrote:
alex1 wrote:If the image is remote, you could also set the width and height when displaying it, based on opencart's settings.

however, it's always better practice to host your own images. What is the supplier updates their site, and changes their url structure? You're going to go through and update all your image references? not scalable....
In this case the supplier puts those images out for this purpose and states the structure will not change. They encourage using URL to keep images fresh.
Problem with this is that everyone could figure out who your supplier is by looking at your image URL. I've found more than one new supplier this way so you are just adding to your competition.

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by mmreed » Tue Dec 27, 2011 6:38 am

labeshops wrote:
mmreed wrote:
alex1 wrote:If the image is remote, you could also set the width and height when displaying it, based on opencart's settings.

however, it's always better practice to host your own images. What is the supplier updates their site, and changes their url structure? You're going to go through and update all your image references? not scalable....
In this case the supplier puts those images out for this purpose and states the structure will not change. They encourage using URL to keep images fresh.
Problem with this is that everyone could figure out who your supplier is by looking at your image URL. I've found more than one new supplier this way so you are just adding to your competition.
In my case its not an issue - there are only 3 or 4 suppliers. (Magic and Illusion items)

All customers even know who they are and often look over the supplier sites to request things to be special ordered.

Newbie

Posts

Joined
Thu Aug 04, 2011 8:46 pm

Post by bratac » Sat Dec 31, 2011 2:38 am

Hi!

I'm looking for a Multi-vendor software i'll be lucky if opecart 1.6 supports this feature!

I think that's a great feature :D

Thanks

Newbie

Posts

Joined
Sat Dec 31, 2011 2:36 am

Post by TomasZet » Sat Dec 31, 2011 8:22 am

Hi! :-)

I'm really looking for a feature that conects and filters payment and shipping.

I mean when the customer selects for example shipping by DHL let him pay only with credit card (and the other methods make unclickable), or when the customer selects Royal Post let him pay by bank transfer or by Pay Pall (and also the other methods make unclickable).

I'm sure that there are some solutions but i don't really know any. Thanks for all tips.

Tomáš

Newbie

Posts

Joined
Wed Nov 09, 2011 9:10 pm
Location - Prague, Czech Republic

Post by nokta » Sun Jan 01, 2012 1:30 am

Customers need to order the pages, as well as can be editable by the admin?

Thank you, happy years

Newbie

Posts

Joined
Mon Dec 19, 2011 5:51 pm

Post by Johnathan » Sat Jan 07, 2012 1:25 am

TomasZet: I've now released a Restrict Payment Methods extension that allows you to limit the availability of payment methods based on the shipping method selected.

It also can restrict based on customer group, currency, cart quantity/sub-total/volume/weight/date, category, manufacturer, or product.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by flexcommerce » Sun Jan 08, 2012 6:50 pm

multi languages for manufacture!

Newbie

Posts

Joined
Tue Jan 03, 2012 6:25 pm

Post by intercept » Mon Jan 09, 2012 9:53 pm

May i do a suggestion?

What i am missing is i think very important when you advertise in Adwords or other platforms and that is the option to create custom landing pages. Not with menus on top or on the left but pure blank landing pages that we can customize through the WYSIWYG editors. It would be really great to integrate a buy now button directly into these landing pages.

That way we can test and have the best optimized pages for selling products through different channels.

This is what i am missing.

Thanks

Newbie

Posts

Joined
Fri May 13, 2011 9:31 pm

Post by TraderDan » Thu Jan 12, 2012 11:28 pm

Please, please, please...

The ability to have Product 'weight' and especially individual Product Option 'weight' trigger the Shipping (and Handling) options/requirements during checkout, while having the 'Requires Shipping' option set to "No".

I sell music and would like to offer physical options (like CD and Vinyl, with weights > 0) alongside digital options (like FLAC and MP3, with weights = 0), but I would only like the shipping/handling components of the cart & checkout to be present when a weight > 0 is detected in the cart.

To present it another way, the result I'm after could be achieved if you could control the 'Requires Shipping' feature at the product option level.

Image


User avatar
New member

Posts

Joined
Thu Oct 27, 2011 10:44 pm
Location - Lawrence, MA
Who is online

Users browsing this forum: No registered users and 10 guests