Comments (9)
Interesting issue :-) Need to give it some more thought.
In the meantime, yes there's a hook for custom slugify function which people mostly use to strip/replace non-ascii chars as you'd want to do here.
http://mezzanine.jupo.org/docs/configuration.html#slugify
from cartridge.
Most likely we'll just increase the field length, but let's think it over some more.
from cartridge.
before I start experimenting with this, let's clarify something:
It is really the "url" field making problems, am I right?
If it's "url" - I would like to do transliteration only once, when products are created/edited in admin,
not later, not every time a product is displayed.
And, I would like to convert Unicode URL's into ASCII7 only for Product's, not for the complete website.
Is there a way to do this?
from cartridge.
The url field here belongs to an item in the cart - it gets copied to the cart item simply to display a link back to the product from the item in the cart. It needs to do this since the cart item does not contain a database relationship to the product it is for - product info (including its url) get copied to the cart item when it's added to the cart.
from cartridge.
I got this error again, and checked the SQL statement.
It is the shop_cartitem.description making troubles, not the url!
Yes, I have a lot of product variations, and the names are quite long and this leads to shop_cartitem.description > 200 char
from cartridge.
I guess we can increase its length too :-)
We'll also ensure that if the description length still exceeds the column size, the description gets truncated - no harm in this.
from cartridge.
Again though - like I mentioned in the other issue, it seems like you're pushing Cartridge way outside its intended usage.
from cartridge.
it seems like you're pushing Cartridge way outside its intended usage.
Well, may be you are right.
- Regarding the variation names (like "color" and "colors" itself) - yes, some names in my case are quite long, but, I think this impacts only "shop_cartitem.description" where variation names are concatenated.
The length of this field can be increased, so it is not a big problem. - The number of variations per product. Can be counted with the SQL statement:
select count(*) from shop_productvariation where product_id in
(select id from shop_product where slug='---your slug here----')
In my case, after removing some of the options, this statement returns 144. I understand, thats a lot.
May be Cartridge documentation can be updated, to include a warning, something like "avoid creating too much variations"
How can I optimize my site to work with this number of variations? (Only few products will have 144 variations, not all of them).
I think, the N1 this cycle in the shop/product.html:
{% for variation in variations %}
Everything in this cycle will be repeated number_of_variations times (144 in my case),
so amount of HTML produced by this cycle should be minimized.
I'm sure there are other places that can be tuned...
Again, this could be documented...
from cartridge.
Can I suggest you take this discussion to the mailing list, thanks.
from cartridge.
Related Issues (20)
- Paypal payment for the current version HOT 1
- New release with the fixes merged in HOT 1
- Translation into Spanish HOT 2
- 'max_digits' must be great or equal to 'decimal_places' on OpenBSD HOT 5
- Screenshots on main page
- Missing migration for mezzanine.core Slugged HOT 2
- Travis checks fail with pip --allow-unverified for pyPdf HOT 1
- django.urlresolvers was moved in Django 1.10 HOT 1
- Travis is not testing current Django builds HOT 1
- Requirements missing from project_template HOT 1
- Duplicate admin order confirmation email sent upon "Re-send order email"
- is it possible to show all products in one page? HOT 1
- Executing management import and export products
- Link to Model Graph in Documentation is broken HOT 2
- Fix simple typo: remaning -> remaining HOT 1
- Stripe integration no longer works HOT 1
- How to remove a checkout field if cart item is from some specific product category
- Security concern HOT 3
- 'Cart' instance needs to have a primary key value before this relationship can be used. HOT 6
- Add online-shop and ecommerce tags to the repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cartridge.