Code Monkey home page Code Monkey logo

yii2-cart's People

Contributors

dd174 avatar deadly299 avatar halumein avatar pistol88 avatar qwertyrrr avatar theelk2 avatar thezillo avatar usesgraphcrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-cart's Issues

TAX

I see there is no possiblity to show / calculate tax per item per country yet
Every item can their own VAT %
Every country sets their own VAT levels.. so if I order from teh US I need to pay a different VAT than if I order from Europe

Typo

There is a typo in element\create
undefind => undefined

Typo... space missing

Line total : 200€
Cart total : 200 €
Nicer if there is a space between the number and the currency on the line total

Demo

Do you have a demo -site where I can see how your modules work

Multipl ElementLists

In my main menu I have placed a dropdown elementlist
Then in my checkoutpage I have a full elementlist.
However...
Now my checkoutpage has a menu with a dropdown elementlist
the full elementlist is no longer displayed by changed into an dropdown version.
How can I prevent that?

ElementList

This looks like a nice widget, but the columns are commented out...
Can you fix this so it resembles the hemp rows ?

Overwrite

I though to solve my problems I could just download the package (outside in composer) and integrate and modify it.
However, then I get a cannot instantiate sercive CartService.

Docs

It looks like you created an awesome extension, unfortunately I do not speak russian. Can you please make the documentation in English ?

Добавить вывод элементов коммиссия и сумма с коммиссией через ajax

При удалении элемента из корзины цена меняется через ajax. Я добавил два элемента - комиссия и сумма с учетом комиссии.
Добавил в defaultcontroller:

private function _cartJson($json)
{
if ($cartModel = yii::$app->cart) {
$json['elementsHTML'] = \pistol88\cart\widgets\ElementsList::widget();
$json['count'] = $cartModel->getCount();
$json['price'] = $cartModel->getCostFormatted();
$json['commission'] = 0.5;
$json['sum'] = $json['price']*(1+$json['commission'] );

} else {
$json['count'] = 0;
$json['price'] = 0;
}
return Json::encode($json);
}

То же самое в Elementcontroller в функции _cartJson().
В scripts.js изменил

renderCart: function(json) {
if(!json) {
var json = {};
jQuery.post('/cart/default/info', {},
function(answer) {
json = answer;
}, "json");
}
 
jQuery('.pistol88-cart-block').replaceWith(json.elementsHTML);
jQuery('.pistol88-cart-count').html(json.count);
jQuery('.pistol88-cart-price').html(json.price);
jQuery('.pistol88-cart-sum').html(json.sum);
jQuery('.pistol88-cart-commission').html(json.commission);
 
jQuery(document).trigger("renderCart", json);
 
return true;
},

post Обрабатывается нормально, данные передаются, но значения sum и commission не обновляются через ajax.
Подскажите, как сделать, что б эти поля тоже обновлялись через ajax?

Вопрос

А зачем нужен parent_id ? у меня сразу с ним возникла ошибка ... так как он всегда у меня NULL... подправил базу что бы пропускал NULL.
И еще есть метод PUT у компонента - почему не сделать сразу UPDATE(id,Element) и DELETE(id)

Widget per line

I see there is a widget that shows the dynamic price (when I increase the count). But is there also a version for the lineitem ?
So if I increase teh count , then that items total ( is also updated) like in the hemp site

Demo Discount

Do you have a sample on how to implement the discount ?
The docs are not clear as where to include that code sniplet

Delete item in cart

When I delete 1 item in the cart, the entire card is dynamically removed (screen is empty)
Only after a reload the items that are still in the cart are displayed again

Demo site- buy button animation

In your hemp site you have this beautiful animation when you click add to cart .. the circle that moves to the cart button on top. How do you do that ?

TIP

Currently you have your formatting done in multiple functions, better and more consistent is to have only one major formatting function

Something like this

function getCostFormatted()
{
  return $this->format( $cost );
}
function getPriceFormatted
{
 return $this->format( $price);
}

Very slow cart query

In my case, query
SELECT * FROM cartWHEREuser_id=1 takes around 60-100ms
This is realy slow because field user_id has both user ids and hashes of sessions.
Only solution to fix that is to split sessions and ids in different columns so it could be possible to make indexes for them.

Cart Design

How can I create my own cart design with multiple rows and the checkout fields?

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.