Giter VIP home page Giter VIP logo

grav-plugin-shoppingcart-personalizer's People

Contributors

leotiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grav-plugin-shoppingcart-personalizer's Issues

Duplicate Product Page & Products Page Published Toggle in Admin

Very excited about this project! Grav could really use a native shopping cart and you've gone a long way to making it happen.

I'm building a store to sell online and in-person courses. I noticed that when the Personalizer plugin is enabled, the Admin plugin shows a second set of Yes|No toggles for the Published status on the Options tab for the shoppingcart_products and shoppingcart_product pages.

screen shot 2018-10-14 at 8 44 24 am

The HTML looks like this:

<div class="form-field grid form-field-toggleable  ">
	<div class="form-label block size-1-3">
		<span class="checkboxes toggleable" data-grav-field="toggleable" data-grav-field-name="data[header][published]">
			<input id="toggleable_header.published" value="1" name="toggleable_data[header][published]" checked="checked" type="checkbox">
			<label for="toggleable_header.published">
			</label>
		</span>
		<label class="toggleable" for="toggleable_header.published">
			<span class="hint--bottom" data-hint="By default, a page is published unless you explicitly set published: false or via a publish_date being in the future, or unpublish_date in the past">
			</span>
		</label>
	</div>
	<div class="form-data block size-2-3" data-grav-field="toggle" data-grav-disabled="1" data-grav-default="null" data-grav-field-name="data[header][published]">
		<div class="switch-toggle switch-grav medium switch-4 ">
			<input value="0" id="toggle_header.published0" name="data[header][published]" class="" type="radio">
			<label for="toggle_header.published0">
			</label>
			<input value="1" id="toggle_header.published1" name="data[header][published]" class="highlight" checked="checked" type="radio">
			<label for="toggle_header.published1">
			</label>
			<input value="2" id="toggle_header.published2" name="data[header][published]" class="" type="radio">
			<label for="toggle_header.published2">
			</label>
			<input value="3" id="toggle_header.published3" name="data[header][published]" class="" type="radio">
			<label for="toggle_header.published3">
			</label>
		</div>
	</div>
</div>

If I select either of the second set, the page fails to save with a validation error. The first set works as expected.

The shoppingcart_categories page toggles are normal.

Old Form Dependency

Using Admin Panel to install, I am blocked by the following error:

Dependency form is required in an older version than the one installed. This package must be updated. Please get in touch with its developer.

I will have a try with manual installation options as well โ€“ just raising an issue here as well, since it seems a fix is needed to maintain compatibility.

Update: manual installation causes site to crash. Seems this plugin is no longer usable with latest version of Grav/Forms

Variation Required Displays Base Price Which Is Not Available

If I enable the Variation Required option, the Products item in a Products page shows "From NNN" where NNN is the price before variation amounts are added. So the user sees a price that is not available to them. For example, with

  • Product Price: $10
  • Variations Group Default Price: $80
  • Variations > Regular: $90
  • Variations > Discount: $25

The user sees From $10, but only $10+$80 or $10+25% prices are available.

This appears to be implemented with the following lines in shoppingcart_core_pricelowest.html.twig:

    {% for group in variationgroups if group.variations|length > 0 and group.grouprequired %}

        {% set groupindex = 'g_' ~ (loop.index * 1000) ~ '_' %}    
        {% set prices = { 0: 100000000 } %}    
        {% for variation in group.variations %}
            {% if variation.price matches '/^[0-9]*\\.?[0-9]+$/' %}            
                {% set prices = prices|merge({(loop.index) : (group.groupasinput ? variation.price * (variation.varmin ? variation.varmin : group.groupmin) : variation.price) }) %}
            {% elseif group.groupprice matches '/^[0-9]*\\.?[0-9]+$/' and group.groupprice > 0 %}            
                {% set prices = prices|merge({(loop.index) : (group.groupasinput ? groupprice * (variation.varmin ? variation.varmin : group.groupmin) : group.groupprice)}) %}
            {% endif %}
        {% endfor %}    
        {% set initialPrice = (initialPrice + min(prices)) %}
    {% endfor %}

Although I can't figure out where the word "From" is being added to this.

I would like to test it

Hello,

I would like to test it but when i enable the plugin, i get this :
image
instead of:
image

Without the pluging in the detail form i have got :
image

but with the plugin :
image

I thinl i have not seen a setup. I have tried to play with :
image

if you have got any idea.

Thanks

personalizer or original ?

Hello,
Thanks for your great work.
Will you merge your shoppingcart-personalizer module and original shoppingcart into one new-shoppingcart?
Or do we need to use shoppingcart-personalizer as addon and also shoppingcart module?

Undefined Variations Group Name

When the Variation Required value is set to No, the variation list appears with "PLUGIN_SHOPPINGCART.PERSONALIZE_SELECT_VARIATION" because that constant is not defined anywhere.

Variable Products

Does this addon support variable products ?
Like products with different color or size? Or we will need to create separate products for each variation?

If yes, where i can find documentation to create variable products?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.